[EMAIL PROTECTED] wrote:
> Hi!
> 
> After reading tutorial about Django, try to write simple app. App
> contain only one model:
> class PressureRecord(meta.Model):
>     record_date = meta.DateField()
>     record_time = meta.TimeField()
>     sys_press = meta.IntegerField()
>     dia_press = meta.IntegerField()
>     pulse = meta.IntegerField()
>     comment = meta.CharField(maxlength = 200,blank = True)
>     class META:
>         ordering = ['-record_date','-record_time']
>         admin = meta.Admin(
>             list_filter = ['record_date'],
>             list_display =
> ['record_date','record_time','sys_press','dia_press','pulse'],
>             date_hierarchy = 'record_date'
>             )
> 
> Django version: SVN, revision 1778
> Backend: MySQL
> Templates: not modified
> HTTP server: build-in
> 
> All debug in settings.py enabled:
> DEBUG = True
> TEMPLATE_DEBUG = DEBUG
> 
> When i save record from admin interface, i'm got exception:
> ----
>  Traceback (most recent call last):
>   File
> "/usr/lib/python2.3/site-packages/django/core/servers/basehttp.py",
> line 272, in run
>     self.result = application(self.environ, self.start_response)
>   File
> "/usr/lib/python2.3/site-packages/django/core/servers/basehttp.py",
> line 615, in __call__
>     return self.application(environ, start_response)
>   File "/usr/lib/python2.3/site-packages/django/core/handlers/wsgi.py",
> line 155, in __call__
>     response = self.get_response(request.path, request)
>   File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py",
> line 109, in get_response
>     return self.get_technical_error_response(request)
>   File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py",
> line 139, in get_technical_error_response
>     return debug.technical_500_response(request, *sys.exc_info())
>   File "/usr/lib/python2.3/site-packages/django/views/debug.py", line
> 126, in technical_500_response
>     return HttpResponseServerError(t.render(c), mimetype='text/html')
>   File
> "/usr/lib/python2.3/site-packages/django/core/template/__init__.py",
> line 146, in render
>     return self.nodelist.render(context)
>   File
> "/usr/lib/python2.3/site-packages/django/core/template/__init__.py",
> line 707, in render
>     bits.append(self.render_node(node, context))
>   File
> "/usr/lib/python2.3/site-packages/django/core/template/__init__.py",
> line 725, in render_node
>     result = node.render(context)
>   File
> "/usr/lib/python2.3/site-packages/django/core/template/defaulttags.py",
> line 112, in render
>     nodelist.append(node.render(context))
>   File
> "/usr/lib/python2.3/site-packages/django/core/template/defaulttags.py",
> line 179, in render
>     return self.nodelist_true.render(context)
>   File
> "/usr/lib/python2.3/site-packages/django/core/template/__init__.py",
> line 707, in render
>     bits.append(self.render_node(node, context))
>   File
> "/usr/lib/python2.3/site-packages/django/core/template/__init__.py",
> line 735, in render_node
>     raise wrapped
> TemplateSyntaxError: Caught an exception while rendering.
> ----
> 
> How i can locate the origin of this error?
> 
> 

Hi,

Looks like you have found a combination of two bugs. One is the error
template breaking, the other is the original bug. Try setting
TEMPLATE_DEBUG=False .

We probably need to make a "Robust" template mode which just swallows
errors as soon as possible for the error template...

Reply via email to