2đź‘Ť
âś…
Should the last line of the “main” view contain “blog/list.html” instead of “list.html”?
Try replacing that line with the following:
return render_to_response("blog/list.html", dict(posts=posts, user=request.user))
Do the same thing with the “post” view.
Basically, Django is going to look under each of the configured template directories in settings.py and if you specify “list.html” it better be in the root of of of those directories. Since you put the “list.html” in the “blog” sub-directory and not where you told it to look, Django can’t find it.
👤Evan Porter
0đź‘Ť
First, you have a missing leading / in your template directory:
TEMPLATE_DIRS = (
"/home/django-projects/base/templates/",
)
👤Antoine Pelisse
- [Answered ]-Username in URL for Django User Profile
- [Answered ]-Install django db log
- [Answered ]-Strange 404 error in djangocms when using details view
Source:stackexchange.com