>Are you sure? Because now it throws a NameError exception.
>global name 'gettext_lazy' is not defined

Yes, I am sure. I wrote that stuff ;-)

>>> from django.utils.translation import gettext_lazy, activate
>>> activate('de-de')
>>> print gettext_lazy('Username:')
Benutzer:

So you just need to pull in the gettext_lazy function and use that
directly instead of renaming it to _ - then it should work fine. Only
problem with model code: "Using module globals in models". Look at the
named chapter on http://code.djangoproject.com/wiki/DataModelPitfalls.
You can only use functions from your modules global namespace, if you
pass them on to the model in the right way. This problem will go away
with magic-removal.

bye, Georg

Reply via email to