Path issue (TemplateDoesNotExist)

359 views
Skip to first unread message

M. Bashir Al-Noimi

unread,
Jun 1, 2010, 11:44:48 PM6/1/10
to django...@googlegroups.com
Hi folks,

I'm trying to build my first blog by python/django but during writing it I faced a path problem so django couldn't recognize template path.
For that the debugger gave me the following log (you can see full log and the whole project in the attachment), although I added the absolute template path to TEMPLATE_DIRS tuple. Could you please tell me what's wrong?

PS
I still newbie guys ;-)

--log--

TemplateDoesNotExist at /

posts/post_list.html
Request Method: GET
Request URL: http://127.0.0.1:8000/
Exception Type: TemplateDoesNotExist
Exception Value:
posts/post_list.html
Exception Location: C:\Python26\lib\site-packages\django\template\loader.py in find_template_source, line 74
Python Executable: C:\Python26\python.exe
Python Version: 2.6.3
Python Path: ['Q:\\Apps\\Common\\eclipse-py\\workspace\\MyBlog\\src\\MyBlog', 'Q:\\Apps\\Common\\eclipse-py\\workspace\\MyBlog\\src', 'Q:\\Apps\\Common\\eclipse-py\\workspace\\MyBlog\\templates', 'C:\\Python26', 'C:\\Python26\\DLLs', 'C:\\Python26\\lib', 'C:\\Python26\\lib\\lib-tk', 'C:\\Python26\\lib\\plat-win', 'C:\\Python26\\lib\\site-packages', 'C:\\WINDOWS\\system32\\python26.zip']
Server time: Mon, 31 May 2010 15:45:49 +0200

-- 
Best Regards
Muhammad Bashir Al-Noimi
My Blog: http://mbnoimi.net
MyBlogProject.zip
debugger_log.htm

Nuno Maltez

unread,
Jun 2, 2010, 6:17:28 AM6/2/10
to django...@googlegroups.com
Well, if you're trying to render a template : "posts/post_list.html",
the post_list.html file should live inside "posts" directory inside of
your "templates" directory :

templates/posts/post_list.html

Don't mix html and python files in the same dir.

Nuno

> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

M. Bashir Al-Noimi

unread,
Jun 2, 2010, 2:49:11 PM6/2/10
to django...@googlegroups.com
Thanks Nuno this fixed the issue.
Reply all
Reply to author
Forward
0 new messages