Hi folks,
I'm having a problem with a single module and its translations.
This module has some lazy translation (the same as other modules), but
in admin, it spreads an error.
Error is the following:
TemplateSyntaxError at /admin/tieredpricing/pricingtier/add/
Caught TypeError while rendering: Lazy object returned unexpected type.
Request Method: GET
Request URL: http://localhost:8000/admin/tieredpricing/pricingtier/add/
Django Version: 1.3
Exception Type: TemplateSyntaxError
Exception Value:
Caught TypeError while rendering: Lazy object returned unexpected type.
Exception Location:
/usr/local/lib/python2.7/dist-packages/django/utils/functional.py in
__wrapper__, line 197
Python Executable: /usr/bin/python
Python Version: 2.7.1
In template
/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/includes/fieldset.html,
error at line 6
Caught TypeError while rendering: Lazy object returned unexpected type.
1 <fieldset class="module aligned {{ fieldset.classes }}">
2 {% if fieldset.name %}<h2>{{ fieldset.name }}</h2>{% endif %}
3 {% if fieldset.description %}
4 <div class="description">{{ fieldset.description|safe }}</div>
5 {% endif %}
6 {% for line in fieldset %}
At line 6.
Then I traced that error to its dispatcher, and I found the following:
at line 402 of file django/forms/forms.py there is the following line:
self.help_text = field.help_text or ''
my problem is that field.help_text must contain an unicode string (u'')
and not that weird object that is containing,
<django.utils.functional.__proxy__ object at 0xb6a1332c>
I've found a way to solve it, and is to call __unicode__() function on
that object, that explicitly gives me the right unicode string, but that
code is django core, and I don't know if it's a django issue.
Can anybody help me plz?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.