peterf81
unread,Aug 29, 2009, 7:44:35 PM8/29/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CNProg open discussion
Hello,
i received this exception :
TemplateSyntaxError at /questions/3/test
Caught an exception while rendering:
u'question.get_close_reason_display'
Original Traceback (most recent call last):
File "/usr/local/alwaysdata/python/django/1.0.2/django/template/
debug.py", line 71, in render_node
result = node.render(context)
File "/usr/local/alwaysdata/python/django/1.0.2/django/templatetags/
i18n.py", line 85, in render
data = dict([(v, force_unicode(context[v])) for v in vars])
File "/usr/local/alwaysdata/python/django/1.0.2/django/template/
context.py", line 43, in __getitem__
raise KeyError(key)
KeyError: u'question.get_close_reason_display'
I receive exception in all templates where blocktrans was used without
"with" keyword :
when i change for example this :
{% blocktrans %} ... {{question.get_close_reason_display}}
to
{% blocktrans with question.get_close_reason_display as
get_close_reason_display %} ... {get_close_reason_display}
then it works OK (i need to do makemessages afterwards).
Do you think i can commit my changes to the repository?
Thanks,
Peter