Re: Template Loader Error: (It's been really frustrating till now..!)
On 19 July 2012 04:46, Mark Anderko <manderko@google.com> wrote:
make sure that /home/tony/Documents/blog/blog/templates/about.html exist. Else, add templates directory to the TEMPLATE_DIRS.
I am having similar problems. did you manage to get this fixed?
On Wednesday, January 25, 2012 6:51:34 AM UTC-8, leaks wrote:Hey all... i get this error while i have a template directory and my
about.html file.... It doesn't display the home.html either...
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/about/
Django Version: 1.3.1
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Template Loader Error:
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
/home/tony/Documents/blog/blog/templates/about.html (File does not
exist)
make sure that /home/tony/Documents/blog/blog/templates/about.html exist. Else, add templates directory to the TEMPLATE_DIRS.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/b7u_nPwieJMJ.Using loader django.template.loaders.app_directories.Loader:--
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/
base.py" in get_response
111. response = callback(request,
*callback_args, **callback_kwargs)
File "/home/tony/Documents/blog/../blog/views.py" in about
9. return render_to_response('about.html',)
File "/usr/local/lib/python2.7/dist-packages/django/shortcuts/
__init__.py" in render_to_response
20. return HttpResponse(loader.render_to_string(*args,
**kwargs), **httpresponse_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/template/
loader.py" in render_to_string
181. t = get_template(template_name)
File "/usr/local/lib/python2.7/dist-packages/django/template/
loader.py" in get_template
157. template, origin = find_template(template_name)
File "/usr/local/lib/python2.7/dist-packages/django/template/
loader.py" in find_template
138. raise TemplateDoesNotExist(name)
Exception Type: TemplateDoesNotExist at /about/
Exception Value: about.html
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home