Hello, I am trying to render a template in my models (to get the model details in a printable format), but I want the template string to be internationalised. ugettext_lazy does not return a string object, and the template returns nothing. My code is:
template = Template(_("{{ self.name }}")) context = Context({"self": self}).render return template.render(context) This fails. Is there something I can do , or do I have to forget about internationalisation? Can I just use ugettext() instead? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---