Re: TemplateDoesnotExist: 500.html

2012-04-02 Thread FraMazz
If you need to know what goes in the 500 template have a look at: 
http://www.djangobook.com/en/2.0/chapter12/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/37kP93U2aGoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: TemplateDoesnotExist: 500.html

2012-03-31 Thread Gabriel .
On Sat, Mar 31, 2012 at 5:03 PM, Pals  wrote:
>  I am a novice programmer who just started to learn Django.. I could
> not figure out the error related to 500.html. In fact, I would be
> grateful if someone guides me making 500.html file. I am using mac
> osx, Python 2.7 and Django 1.4.
>

https://docs.djangoproject.com/en/dev/topics/http/views/#the-500-server-error-view

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



TemplateDoesnotExist: 500.html

2012-03-31 Thread Pals
 I am a novice programmer who just started to learn Django.. I could
not figure out the error related to 500.html. In fact, I would be
grateful if someone guides me making 500.html file. I am using mac
osx, Python 2.7 and Django 1.4.

Thanks!

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Urgent: django app got internal error: TemplateDoesNotExist: 500.html

2011-12-19 Thread huseyin yilmaz
It looks to me like you do not have 500.html file in your base
template directory. If you have a server error in production mode
(DEBUG = False), django will show 500.html to users. So users will not
see actual error message. But you will get that message by email.
Since you do not have 500.html it gives you template does not exist
error instead of actual error message. This will not help you to solve
your problem, but at least it will help you identify it.

On Dec 19, 9:24 pm, Ashkan Roshanayi <ashkan.roshan...@gmail.com>
wrote:
> I tried to live edit base.py template but now my app has internal error. I
> undo the changes but still get 500 error while accessing website. Tail -f
> of my application_name.log shows:
>
>
>
>
>
>
>
>
>
>
>
> >   File
> > "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> > line 108, in __init__
> >     self.nodelist = compile_string(template_string, origin)
> >   File
> > "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> > line 136, in compile_string
> >     return parser.parse()
> >   File
> > "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> > line 237, in parse
> >     self.invalid_block_tag(token, command, parse_until)
> >   File
> > "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> > line 291, in invalid_block_tag
> >     raise self.error(token, "Invalid block tag: '%s'" % command)
> > TemplateSyntaxError: Invalid block tag: '%20get_static_prefix%20'
>
> And tail -f of error.log shows:
>
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]     return
>
>
>
>
>
>
>
>
>
> > callback(request, **param_dict), referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> > "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/utils/decorators.py",
> > line 93, in _wrapped_view, referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]     response =
> > view_func(request, *args, **kwargs), referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> > "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/views/defaults.py",
> > line 30, in server_error, referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]     t =
> > loader.get_template(template_name) # You need to create a 500.html
> > template., referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> > "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/loader.py",
> > line 157, in get_template, referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]     template,
> > origin = find_template(template_name), referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> > "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/loader.py",
> > line 138, in find_template, referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]     raise
> > TemplateDoesNotExist(name), referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> > TemplateDoesNotExist: 500.html, referer:
> >http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6...
> > [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206] mod_wsgi
> > (pid=2688): Exception occurred processing WSGI script
> > '/home/jalala/projects/Hamkharid/bin/django.wsgi'.
> > [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206] Traceback
> > (most recent call last):
> > [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]   File
> > "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/core/handlers/wsgi.py",
> > line 272, in __call__
>

Re: Urgent: django app got internal error: TemplateDoesNotExist: 500.html

2011-12-19 Thread Nikolas Stevenson-Molnar
Also, your "undo" may not have been picked up by the app; I would also
try restarting your webserver.

_Nik

On 12/19/2011 11:24 AM, Ashkan Roshanayi wrote:
> I tried to live edit base.py template but now my app has internal
> error. I undo the changes but still get 500 error while accessing
> website. Tail -f of my application_name.log shows:
>
>
>   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> line 108, in __init__
> self.nodelist = compile_string(template_string, origin)
>   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> line 136, in compile_string
> return parser.parse()
>   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> line 237, in parse
> self.invalid_block_tag(token, command, parse_until)
>   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> line 291, in invalid_block_tag
> raise self.error(token, "Invalid block tag: '%s'" % command)
> TemplateSyntaxError: Invalid block tag: '%20get_static_prefix%20'
>
>
> And tail -f of error.log shows:
>
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> return callback(request, **param_dict), referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/utils/decorators.py",
> line 93, in _wrapped_view, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> response = view_func(request, *args, **kwargs), referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/views/defaults.py",
> line 30, in server_error, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121] t
> = loader.get_template(template_name) # You need to create a
> 500.html template., referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/loader.py",
> line 157, in get_template, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> template, origin = find_template(template_name), referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/loader.py",
> line 138, in find_template, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> raise TemplateDoesNotExist(name), referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> TemplateDoesNotExist: 500.html, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]
> mod_wsgi (pid=2688): Exception occurred processing WSGI script
> '/home/jalala/projects/Hamkharid/bin/django.wsgi'.
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]
> Traceback (most recent call last):
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/core/handlers/wsgi.py",
> line 272, in __call__
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]
> response = self.get_response(request)
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/core/handlers/base.py",
> line 169, in get_re

Re: Urgent: django app got internal error: TemplateDoesNotExist: 500.html

2011-12-19 Thread Nikolas Stevenson-Molnar
It looks like your changes weren't undone correctly, given the "Invalid
block tag" error. I would double check that tag, make sure it is
correct, and make sure than any required loading is done for that tag to
be available to the template.

The other error (TemplateDoesNotExist) is really related to the first
error: the first error would show a "500" page to the user, but since
you don't have a 500.html template defined, you get the
"TemplateDoesNotExist" instead.

_Nik

On 12/19/2011 11:24 AM, Ashkan Roshanayi wrote:
> I tried to live edit base.py template but now my app has internal
> error. I undo the changes but still get 500 error while accessing
> website. Tail -f of my application_name.log shows:
>
>
>   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> line 108, in __init__
> self.nodelist = compile_string(template_string, origin)
>   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> line 136, in compile_string
> return parser.parse()
>   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> line 237, in parse
> self.invalid_block_tag(token, command, parse_until)
>   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
> line 291, in invalid_block_tag
> raise self.error(token, "Invalid block tag: '%s'" % command)
> TemplateSyntaxError: Invalid block tag: '%20get_static_prefix%20'
>
>
> And tail -f of error.log shows:
>
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> return callback(request, **param_dict), referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/utils/decorators.py",
> line 93, in _wrapped_view, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> response = view_func(request, *args, **kwargs), referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/views/defaults.py",
> line 30, in server_error, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121] t
> = loader.get_template(template_name) # You need to create a
> 500.html template., referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/loader.py",
> line 157, in get_template, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> template, origin = find_template(template_name), referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/loader.py",
> line 138, in find_template, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> raise TemplateDoesNotExist(name), referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]
> TemplateDoesNotExist: 500.html, referer:
> 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]
> mod_wsgi (pid=2688): Exception occurred processing WSGI script
> '/home/jalala/projects/Hamkharid/bin/django.wsgi'.
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]
> Traceback (most recent call last):
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]   File
> 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/core/handler

Urgent: django app got internal error: TemplateDoesNotExist: 500.html

2011-12-19 Thread Ashkan Roshanayi
I tried to live edit base.py template but now my app has internal error. I 
undo the changes but still get 500 error while accessing website. Tail -f 
of my application_name.log shows:
>
>
>   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
>  
> line 108, in __init__
> self.nodelist = compile_string(template_string, origin)
>   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
>  
> line 136, in compile_string
> return parser.parse()
>   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
>  
> line 237, in parse
> self.invalid_block_tag(token, command, parse_until)
>   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/base.py",
>  
> line 291, in invalid_block_tag
> raise self.error(token, "Invalid block tag: '%s'" % command)
> TemplateSyntaxError: Invalid block tag: '%20get_static_prefix%20'


And tail -f of error.log shows:

[Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121] return 
> callback(request, **param_dict), referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/utils/decorators.py",
>  
> line 93, in _wrapped_view, referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121] response = 
> view_func(request, *args, **kwargs), referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/views/defaults.py",
>  
> line 30, in server_error, referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121] t = 
> loader.get_template(template_name) # You need to create a 500.html 
> template., referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/loader.py",
>  
> line 157, in get_template, referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121] template, 
> origin = find_template(template_name), referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121]   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/template/loader.py",
>  
> line 138, in find_template, referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121] raise 
> TemplateDoesNotExist(name), referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:28 2011] [error] [client 188.158.186.121] 
> TemplateDoesNotExist: 500.html, referer: 
> http://go.madmimi.com/redirects/5e9c3ec9b21e58257eadd15120210f5c?pa=6799748107
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206] mod_wsgi 
> (pid=2688): Exception occurred processing WSGI script 
> '/home/jalala/projects/Hamkharid/bin/django.wsgi'.
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206] Traceback 
> (most recent call last):
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/core/handlers/wsgi.py",
>  
> line 272, in __call__
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206] response = 
> self.get_response(request)
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/core/handlers/base.py",
>  
> line 169, in get_response
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206] response = 
> self.handle_uncaught_exception(request, resolver, sys.exc_info())
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]   File 
> "/home/jalala/projects/Hamkharid/eggs/Django-1.3.1-py2.7.egg/django/core/handlers/base.py",
>  
> line 218, in handle_uncaught_exception
> [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206] return 
> callb

Re: TemplateDoesNotExist: 500.html error when trying to run server

2010-08-07 Thread Karen Tracey
On Fri, Aug 6, 2010 at 5:05 PM, meenakshi  wrote:

> To clarify - I get a 404 message with DEBUG on (i.e. DEBUG=True), and
> a 500 message with DEBUG off (DEBUG=False), not the other way around.
>

With DEBUG=False, standard handling of the Http404 exception will be to
attempt to render a 404.html template. If that template does not exist, this
attempt will result in a server error (500). Standard handling of that error
will attempt to render a 500.html template. If that template does not exist,
that attempt will also cause a server error and the only information about
the whole chain of errors you will see is the last exception, which reports
that 500.html does not exist.

If you want to run with DEBUG=False, you need to create these error
templates (see
http://docs.djangoproject.com/en/dev/topics/http/views/#the-404-page-not-found-viewand
the following section). Failing to do so means any error encountered
will simply result in a report that you do not have a 500.html template.

However, I don't think you want to run with DEBUG=False at this point. The
message:

You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a
standard 404 page.

is not intended to imply your problem will be fixed by setting DEBUG=False,
it is just attempting to explain why you are seeing the detailed error
information page. The standard 404 page (if you had a 404.html template)
would give you no information at all about why the page you are attempting
to access was not found, whereas the debug page you are seeing gives you all
the information you need to fix the problem.

The real error you need to fix is that you are attempting to retrieve the
root page and you do not have any url patterns that match it. Going to
'admin/' works because you have a url pattern that matches that. If you want
to retrieve the root page you need to add a url pattern that matches it and
maps to a view that returns whatever you want to appear on that page.

Karen
-- 
http://tracey.org/kmt/

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



Re: TemplateDoesNotExist: 500.html error when trying to run server

2010-08-06 Thread meenakshi

To clarify - I get a 404 message with DEBUG on (i.e. DEBUG=True), and
a 500 message with DEBUG off (DEBUG=False), not the other way around.

Regards
Meenakshi

On Aug 6, 1:21 pm, Steve Holden <holden...@gmail.com> wrote:
> On 8/6/2010 3:59 PM, meenakshi wrote:
>
> > Hi Steve,
> >     I do have the DEBUG setting on False.  The reason is that when I
> > set DEBUG to True, I get the following message:
>
> > Page not found (404)
> > Request Method:    GET
> > Request URL:      http://127.0.0.1:8000/
>
> > Using the URLconf defined in mysite.urls, Django tried these URL
> > patterns, in this order:
>
> >    1. ^admin/
>
> > The current URL, , didn't match any of these.
>
> That indicates that there is something missing from your urls.py - you
> don't have anything that will match the URL of the site's home page.
>
> As to why youo are getting a 500 error with DEBUG on when you get a 404
> with DEBUG off, may be someone else will have more idea than me.
>
> regards
>  Steve
>
>
>
> > You're seeing this error because you have DEBUG = True in your Django
> > settings file. Change that to False, and Django will display a
> > standard 404 page.
>
> > And thanks for your response!
>
> > Regards
> > Meenakshi
>
> > On Aug 5, 3:50 pm, Steve Holden <holden...@gmail.com> wrote:
> >> On 8/5/2010 6:27 PM, meenakshi wrote:
>
> >>>   I am a beginner working through the Django tutorial.  When I try to
> >>> run the development server athttp://127.0.0.1:8000/,  I get a
> >>> TemplateDoesNotExist: 500.html error.
> >>>    I have no problems linking tohttp://127.0.0.1:8000/admin,
> >>> however.  Whats going on?
>
> >>> Here is what I get when I try to run the server :
>
> >>> ^CMacintosh:mysite mroy$ python2.6 manage.py runserver
> >>> Validating models...
> >>> 0 errors found
>
> >>> Django version 1.1.1, using settings 'mysite.settings'
> >>> Development server is running athttp://127.0.0.1:8000/
> >>> Quit the server with CONTROL-C.
>
> >>> Traceback (most recent call last):
>
> >>>   File "/sw/lib/python2.6/site-packages/django/core/servers/
> >>> basehttp.py", line 279, in run
> >>>     self.result = application(self.environ, self.start_response)
>
> >>>   File "/sw/lib/python2.6/site-packages/django/core/servers/
> >>> basehttp.py", line 651, in __call__
> >>>     return self.application(environ, start_response)
>
> >>>   File "/sw/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
> >>> line 241, in __call__
> >>>     response = self.get_response(request)
>
> >>>   File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
> >>> line 122, in get_response
> >>>     return self.handle_uncaught_exception(request, resolver,
> >>> sys.exc_info())
>
> >>>   File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
> >>> line 166, in handle_uncaught_exception
> >>>     return callback(request, **param_dict)
>
> >>>   File "/sw/lib/python2.6/site-packages/django/views/defaults.py",
> >>> line 23, in server_error
> >>>     t = loader.get_template(template_name) # You need to create a
> >>> 500.html template.
>
> >>>   File "/sw/lib/python2.6/site-packages/django/template/loader.py",
> >>> line 81, in get_template
> >>>     source, origin = find_template_source(template_name)
>
> >>>   File "/sw/lib/python2.6/site-packages/django/template/loader.py",
> >>> line 74, in find_template_source
> >>>     raise TemplateDoesNotExist, name
>
> >>> TemplateDoesNotExist: 500.html
>
> >>> I am using python2.6 and Django version 1.1.  What's wrong?  I
> >>> apologize for this newbie question.  Would really appreciate some
> >>> help.
>
> >> Do you have the DEBUG setting at False? I thought 500 errors would give
> >> a traceback rather than print a 500 response when DEBUG was true.
>
> >> You appear to be getting the error because some part of your logic is
> >> raising an uncaught exception. In order to return the necessary HTTP
> >> response (with status code 500) Django looks for a specific template.
> >> Defining it will be useful for production, but for testing you want to
> >> see the traceback from the error so you know what is going wrong in your
> >> logic.
>
> >> regards
> >>  Steve
> >> --
> >> I'm no expert.
> >> "ex" == "has-been"; "spurt" == "drip under pressure"
> >> "expert" == "has-been drip under pressure".
>
> --
> I'm no expert.
> "ex" == "has-been"; "spurt" == "drip under pressure"
> "expert" == "has-been drip under pressure".

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



Re: TemplateDoesNotExist: 500.html error when trying to run server

2010-08-06 Thread Steve Holden
On 8/6/2010 3:59 PM, meenakshi wrote:
> Hi Steve,
> I do have the DEBUG setting on False.  The reason is that when I
> set DEBUG to True, I get the following message:
> 
> 
> Page not found (404)
> Request Method:   GET
> Request URL:  http://127.0.0.1:8000/
> 
> Using the URLconf defined in mysite.urls, Django tried these URL
> patterns, in this order:
> 
>1. ^admin/
> 
> The current URL, , didn't match any of these.
> 
That indicates that there is something missing from your urls.py - you
don't have anything that will match the URL of the site's home page.

As to why youo are getting a 500 error with DEBUG on when you get a 404
with DEBUG off, may be someone else will have more idea than me.

regards
 Steve

> You're seeing this error because you have DEBUG = True in your Django
> settings file. Change that to False, and Django will display a
> standard 404 page.
> 
> 
> And thanks for your response!
> 
> Regards
> Meenakshi
> 
> 
> On Aug 5, 3:50 pm, Steve Holden <holden...@gmail.com> wrote:
>> On 8/5/2010 6:27 PM, meenakshi wrote:
>>
>>
>>
>>>   I am a beginner working through the Django tutorial.  When I try to
>>> run the development server athttp://127.0.0.1:8000/,  I get a
>>> TemplateDoesNotExist: 500.html error.
>>>I have no problems linking tohttp://127.0.0.1:8000/admin,
>>> however.  Whats going on?
>>
>>> Here is what I get when I try to run the server :
>>
>>> ^CMacintosh:mysite mroy$ python2.6 manage.py runserver
>>> Validating models...
>>> 0 errors found
>>
>>> Django version 1.1.1, using settings 'mysite.settings'
>>> Development server is running athttp://127.0.0.1:8000/
>>> Quit the server with CONTROL-C.
>>
>>> Traceback (most recent call last):
>>
>>>   File "/sw/lib/python2.6/site-packages/django/core/servers/
>>> basehttp.py", line 279, in run
>>> self.result = application(self.environ, self.start_response)
>>
>>>   File "/sw/lib/python2.6/site-packages/django/core/servers/
>>> basehttp.py", line 651, in __call__
>>> return self.application(environ, start_response)
>>
>>>   File "/sw/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
>>> line 241, in __call__
>>> response = self.get_response(request)
>>
>>>   File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
>>> line 122, in get_response
>>> return self.handle_uncaught_exception(request, resolver,
>>> sys.exc_info())
>>
>>>   File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
>>> line 166, in handle_uncaught_exception
>>> return callback(request, **param_dict)
>>
>>>   File "/sw/lib/python2.6/site-packages/django/views/defaults.py",
>>> line 23, in server_error
>>> t = loader.get_template(template_name) # You need to create a
>>> 500.html template.
>>
>>>   File "/sw/lib/python2.6/site-packages/django/template/loader.py",
>>> line 81, in get_template
>>> source, origin = find_template_source(template_name)
>>
>>>   File "/sw/lib/python2.6/site-packages/django/template/loader.py",
>>> line 74, in find_template_source
>>> raise TemplateDoesNotExist, name
>>
>>> TemplateDoesNotExist: 500.html
>>
>>> I am using python2.6 and Django version 1.1.  What's wrong?  I
>>> apologize for this newbie question.  Would really appreciate some
>>> help.
>>
>> Do you have the DEBUG setting at False? I thought 500 errors would give
>> a traceback rather than print a 500 response when DEBUG was true.
>>
>> You appear to be getting the error because some part of your logic is
>> raising an uncaught exception. In order to return the necessary HTTP
>> response (with status code 500) Django looks for a specific template.
>> Defining it will be useful for production, but for testing you want to
>> see the traceback from the error so you know what is going wrong in your
>> logic.
>>
>> regards
>>  Steve
>> --
>> I'm no expert.
>> "ex" == "has-been"; "spurt" == "drip under pressure"
>> "expert" == "has-been drip under pressure".
> 


-- 
I'm no expert.
"ex" == "has-been"; "spurt" == "drip under pressure"
"expert" == "has-been drip under pressure".

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



Re: TemplateDoesNotExist: 500.html error when trying to run server

2010-08-06 Thread meenakshi
Hi Steve,
I do have the DEBUG setting on False.  The reason is that when I
set DEBUG to True, I get the following message:


Page not found (404)
Request Method: GET
Request URL:http://127.0.0.1:8000/

Using the URLconf defined in mysite.urls, Django tried these URL
patterns, in this order:

   1. ^admin/

The current URL, , didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a
standard 404 page.


And thanks for your response!

Regards
Meenakshi


On Aug 5, 3:50 pm, Steve Holden <holden...@gmail.com> wrote:
> On 8/5/2010 6:27 PM, meenakshi wrote:
>
>
>
> >   I am a beginner working through the Django tutorial.  When I try to
> > run the development server athttp://127.0.0.1:8000/,  I get a
> > TemplateDoesNotExist: 500.html error.
> >    I have no problems linking tohttp://127.0.0.1:8000/admin,
> > however.  Whats going on?
>
> > Here is what I get when I try to run the server :
>
> > ^CMacintosh:mysite mroy$ python2.6 manage.py runserver
> > Validating models...
> > 0 errors found
>
> > Django version 1.1.1, using settings 'mysite.settings'
> > Development server is running athttp://127.0.0.1:8000/
> > Quit the server with CONTROL-C.
>
> > Traceback (most recent call last):
>
> >   File "/sw/lib/python2.6/site-packages/django/core/servers/
> > basehttp.py", line 279, in run
> >     self.result = application(self.environ, self.start_response)
>
> >   File "/sw/lib/python2.6/site-packages/django/core/servers/
> > basehttp.py", line 651, in __call__
> >     return self.application(environ, start_response)
>
> >   File "/sw/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
> > line 241, in __call__
> >     response = self.get_response(request)
>
> >   File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
> > line 122, in get_response
> >     return self.handle_uncaught_exception(request, resolver,
> > sys.exc_info())
>
> >   File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
> > line 166, in handle_uncaught_exception
> >     return callback(request, **param_dict)
>
> >   File "/sw/lib/python2.6/site-packages/django/views/defaults.py",
> > line 23, in server_error
> >     t = loader.get_template(template_name) # You need to create a
> > 500.html template.
>
> >   File "/sw/lib/python2.6/site-packages/django/template/loader.py",
> > line 81, in get_template
> >     source, origin = find_template_source(template_name)
>
> >   File "/sw/lib/python2.6/site-packages/django/template/loader.py",
> > line 74, in find_template_source
> >     raise TemplateDoesNotExist, name
>
> > TemplateDoesNotExist: 500.html
>
> > I am using python2.6 and Django version 1.1.  What's wrong?  I
> > apologize for this newbie question.  Would really appreciate some
> > help.
>
> Do you have the DEBUG setting at False? I thought 500 errors would give
> a traceback rather than print a 500 response when DEBUG was true.
>
> You appear to be getting the error because some part of your logic is
> raising an uncaught exception. In order to return the necessary HTTP
> response (with status code 500) Django looks for a specific template.
> Defining it will be useful for production, but for testing you want to
> see the traceback from the error so you know what is going wrong in your
> logic.
>
> regards
>  Steve
> --
> I'm no expert.
> "ex" == "has-been"; "spurt" == "drip under pressure"
> "expert" == "has-been drip under pressure".

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



Re: TemplateDoesNotExist: 500.html error when trying to run server

2010-08-05 Thread Steve Holden
On 8/5/2010 6:27 PM, meenakshi wrote:
> 
>   I am a beginner working through the Django tutorial.  When I try to
> run the development server at http://127.0.0.1:8000/,  I get a
> TemplateDoesNotExist: 500.html error.
>I have no problems linking to http://127.0.0.1:8000/admin,
> however.  Whats going on?
> 
> Here is what I get when I try to run the server :
> 
> ^CMacintosh:mysite mroy$ python2.6 manage.py runserver
> Validating models...
> 0 errors found
> 
> Django version 1.1.1, using settings 'mysite.settings'
> Development server is running at http://127.0.0.1:8000/
> Quit the server with CONTROL-C.
> 
> Traceback (most recent call last):
> 
>   File "/sw/lib/python2.6/site-packages/django/core/servers/
> basehttp.py", line 279, in run
> self.result = application(self.environ, self.start_response)
> 
>   File "/sw/lib/python2.6/site-packages/django/core/servers/
> basehttp.py", line 651, in __call__
> return self.application(environ, start_response)
> 
>   File "/sw/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
> line 241, in __call__
> response = self.get_response(request)
> 
>   File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
> line 122, in get_response
> return self.handle_uncaught_exception(request, resolver,
> sys.exc_info())
> 
>   File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
> line 166, in handle_uncaught_exception
> return callback(request, **param_dict)
> 
>   File "/sw/lib/python2.6/site-packages/django/views/defaults.py",
> line 23, in server_error
> t = loader.get_template(template_name) # You need to create a
> 500.html template.
> 
>   File "/sw/lib/python2.6/site-packages/django/template/loader.py",
> line 81, in get_template
> source, origin = find_template_source(template_name)
> 
>   File "/sw/lib/python2.6/site-packages/django/template/loader.py",
> line 74, in find_template_source
> raise TemplateDoesNotExist, name
> 
> TemplateDoesNotExist: 500.html
> 
> 
> 
> I am using python2.6 and Django version 1.1.  What's wrong?  I
> apologize for this newbie question.  Would really appreciate some
> help.
> 
Do you have the DEBUG setting at False? I thought 500 errors would give
a traceback rather than print a 500 response when DEBUG was true.

You appear to be getting the error because some part of your logic is
raising an uncaught exception. In order to return the necessary HTTP
response (with status code 500) Django looks for a specific template.
Defining it will be useful for production, but for testing you want to
see the traceback from the error so you know what is going wrong in your
logic.

regards
 Steve
-- 
I'm no expert.
"ex" == "has-been"; "spurt" == "drip under pressure"
"expert" == "has-been drip under pressure".

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



TemplateDoesNotExist: 500.html error when trying to run server

2010-08-05 Thread meenakshi

  I am a beginner working through the Django tutorial.  When I try to
run the development server at http://127.0.0.1:8000/,  I get a
TemplateDoesNotExist: 500.html error.
   I have no problems linking to http://127.0.0.1:8000/admin,
however.  Whats going on?

Here is what I get when I try to run the server :

^CMacintosh:mysite mroy$ python2.6 manage.py runserver
Validating models...
0 errors found

Django version 1.1.1, using settings 'mysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Traceback (most recent call last):

  File "/sw/lib/python2.6/site-packages/django/core/servers/
basehttp.py", line 279, in run
self.result = application(self.environ, self.start_response)

  File "/sw/lib/python2.6/site-packages/django/core/servers/
basehttp.py", line 651, in __call__
return self.application(environ, start_response)

  File "/sw/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
line 241, in __call__
response = self.get_response(request)

  File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
line 122, in get_response
return self.handle_uncaught_exception(request, resolver,
sys.exc_info())

  File "/sw/lib/python2.6/site-packages/django/core/handlers/base.py",
line 166, in handle_uncaught_exception
return callback(request, **param_dict)

  File "/sw/lib/python2.6/site-packages/django/views/defaults.py",
line 23, in server_error
t = loader.get_template(template_name) # You need to create a
500.html template.

  File "/sw/lib/python2.6/site-packages/django/template/loader.py",
line 81, in get_template
source, origin = find_template_source(template_name)

  File "/sw/lib/python2.6/site-packages/django/template/loader.py",
line 74, in find_template_source
raise TemplateDoesNotExist, name

TemplateDoesNotExist: 500.html



I am using python2.6 and Django version 1.1.  What's wrong?  I
apologize for this newbie question.  Would really appreciate some
help.

Thanks,
Meenakshi

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



TemplateDoesNotExist: 500.html during deployment

2009-06-13 Thread srk

Hello!

I managed to deploy my django project in production except static
media.
When I try to access http://localhost/adminmedia/account.js (my static
media file), I get colorful page with stack trace of
django.template.TemplateDoesNotExist exception and
TemplateDoesNotExist: 500.html in apache2 log.

My project root is /var/www/webapps/katrin-web.
I want to have /var/www/webapps/katrin-web/katrin/adminmedia located
in /adminmedia.

It seems that Django tries to serve static media instead of apache2.
What's wrong with my static media?
Why standart 500.html doesn't display?

Here is my apache2 conf:

NameVirtualHost localhost:80


ServerAdmin postmas...@localhost
DocumentRoot "/var/www/webapps/katrin-web"
ServerName localhost
ErrorLog "/var/log/httpd2/katrin-error.log"
LogLevel debug
CustomLog /var/log/httpd2/katrin-access.log common
Alias /media/ /usr/lib/python2.5/site-packages/django/contrib/
admin/media/
Alias /adminmedia /var/www/webapps/katrin-web/katrin/
adminmedia


SetHandler None



RewriteBase /
Options +ExecCGI
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRule ^(dispatch\.fcgi/.*)$ - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]



#

some settings:
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
MEDIA_URL = '/adminmedia'
ADMIN_MEDIA_PREFIX = '/media/'
STATIC_DOC_ROOT = '/adminmedia'
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---