Hi, I don't exactly understand the difference between ugettext() and ugettext_lazy(). I read the documentation and I've read that ugettext_lazy translates a string on access. Sounds more efficient. But why do I get this error on that code?
from django.db import models from django.utils.translation import ugettext_lazy as _ class Country(models.Model): name = models.CharField(max_length=256, unique=True) name_iso_2 = models.CharField(max_length=2, unique=True, help_text='http://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste') name_iso_3 = models.CharField(max_length=3, unique=True, help_text='http://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste') def __unicode__(self): return _(self.name) Exception Type: TemplateSyntaxError at /admin/skins/country/ Exception Value: Caught an exception while rendering: coercing to Unicode: need string or buffer, __proxy__ found --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---