Re: Using session variable in models

2007-07-26 Thread Andreas Pfrengle
You probably also should consider if there EVER will be the possibility to support other languages. If so, you will have to do much refactoring doing it this way. Have a look at this thread: Andre

Re: Using session variable in models

2007-07-25 Thread Arnold Chen
You know? you are superb!!! Arnold On Jul 25, 7:19 am, "Wolfram Kriesing" <[EMAIL PROTECTED]> wrote: > and i forgot, this allows you to access the property "name" of the > object anywhere seemlessly, in the template, in the code, etc. this is > pretty neat imho :-) > > wolfram > > On 7/25/07, Wo

Re: Using session variable in models

2007-07-25 Thread Wolfram Kriesing
and i forgot, this allows you to access the property "name" of the object anywhere seemlessly, in the template, in the code, etc. this is pretty neat imho :-) wolfram On 7/25/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote: > after some investigation and help from the list i took this approach >

Re: Using session variable in models

2007-07-25 Thread Wolfram Kriesing
after some investigation and help from the list i took this approach and have to say it works great: from django.utils import translation @property def name(self): if translation.get_language()=="en": return self.name_en else: return self.name_de