Opened 19 years ago

Closed 19 years ago

#1377 closed defect (invalid)

template syntax error after modifying meta.admin fields label

Reported by: volker Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have tried to set up the blog as described in http://www.rossp.org/blog/2006/jan/23/building-blog-django-1/
i then modified the model for the Post Class in order to rearrange field ordering in the admin section as follows, where the --> arrows denote my changes:

class META:

admin = meta.Admin(

###--->modification

fields = (

(None, {'fields': ('title', 'slug', 'date', 'description')}),

),

###--->modification end

list_display = ('slug', 'title', 'date'),
search_fields = ('title', 'description'),
date_hierarchy = ('date',),

)

this then leads to the following error output from django:

Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/django_src/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_src/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 159, in call

response = self.get_response(request.path, request)

File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py", line 113, in get_response

return self.get_technical_error_response(request)

File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py", line 143, in get_technical_error_response

return debug.technical_500_response(request, *sys.exc_info())

File "/usr/lib/python2.3/site-packages/django_src/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 714, in render

bits.append(self.render_node(node, context))

File "/usr/lib/python2.3/site-packages/django/core/template/init.py", line 732, 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 174, in render

return self.nodelist_true.render(context)

File "/usr/lib/python2.3/site-packages/django/core/template/init.py", line 714, in render

bits.append(self.render_node(node, context))

File "/usr/lib/python2.3/site-packages/django/core/template/init.py", line 742, in render_node

raise wrapped

TemplateSyntaxError: Caught an exception while rendering.

hope this is not just a user error on my side.

Best regards, volker

Change History (1)

comment:1 by Tom Tobin <korpios@…>, 19 years ago

Resolution: invalid
Status: newclosed

This belongs on the django-users mailing list, not the ticket tracker.

Note: See TracTickets for help on using tickets.
Back to Top