#12104: Object->object lookup fails in blocktrans
----------------------------------+-----------------------------------------
Reporter: philipn | Owner: nobody
Status: new | Milestone:
Component: Internationalization | Version: 1.1
Keywords: | Stage: Unreviewed
Has_patch: 1 |
----------------------------------+-----------------------------------------
Lookups such as{{{ {{O.a}} }}}fail in {{{blocktrans}}} blocks.
Here is a complete example:
{{{
{% load i18n %}
<html>
<body>
This causes a keyerror:
{% blocktrans %}
Value 'a' of object O: {{ O.a }}
{% endblocktrans %}
The following, of course, works:
Value 'a' of object O: {{ O.a }}
</body>
</html>
}}}
With a view being:
{{{
def blocktrans(request):
O = {'a': 'Foo!'}
d = {
'O': O,
}
return render_to_response('home.html', d)
}}}
I have attached a patch.
--
Ticket URL: <http://code.djangoproject.com/ticket/12104>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---