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/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 callback(request, **param_dict)
>     [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/utils/decorators.py",
>     line 93, in _wrapped_view
>     [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]    
>     response = view_func(request, *args, **kwargs)
>     [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/views/defaults.py",
>     line 30, in server_error
>     [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]     t
>     = loader.get_template(template_name) # You need to create a
>     500.html template.
>     [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/template/loader.py",
>     line 157, in get_template
>     [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]    
>     template, origin = find_template(template_name)
>     [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/template/loader.py",
>     line 138, in find_template
>     [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]    
>     raise TemplateDoesNotExist(name)
>     [Mon Dec 19 13:22:55 2011] [error] [client 109.125.144.206]
>     TemplateDoesNotExist: 500.html
>
>  
>  Is there anything I can do now? sorry but this is very urgent for me
> so your kind helps will be very appreciated. 
>
> Cheers,
>
> -- 
> 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/-/zLZcyTngl2sJ.
> 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.

-- 
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.

Reply via email to