Re: Templates in models and i18n.

2009-04-12 Thread Poromenos
It's not an entire template, I'm just using the template system as an alternative to string formatting because of its name resolution capabilities. I found out how to do it, actually, I used ugettext instead of lazy an it works well! Poromenos On 12 Απρ 2009, at 19:52, Karen Tracey wrote:

Re: Templates in models and i18n.

2009-04-12 Thread Karen Tracey
On Sun, Apr 12, 2009 at 11:29 AM, Poromenos wrote: > > 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 not

Templates in models and i18n.

2009-04-12 Thread Poromenos
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 }}")) con