Caught an exception while rendering: u'question.get_close_reason_display'

7 views
Skip to first unread message

peterf81

unread,
Aug 29, 2009, 7:44:35 PM8/29/09
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

Adolfo Fitoria

unread,
Aug 30, 2009, 10:46:20 AM8/30/09
to cnp...@googlegroups.com
2009/8/29 peterf81 <pete...@gmail.com>:
I had the same error and I commited the changes on my fork check it
out http://github.com/fitoria/CNPROG/tree/master

--
Adolfo Fitoria
http://fitoria.net

peterf81

unread,
Sep 2, 2009, 10:56:42 PM9/2/09
to CNProg open discussion
Hello,

so I should download your fork ? Or will you push your changes to the
master repository ?

On Aug 30, 4:46 pm, Adolfo Fitoria <adolfo.fito...@gmail.com> wrote:
> 2009/8/29 peterf81 <peter...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages