Re: DateInput widget, format attr & ugettext

2009-08-12 Thread carsten
Thanks, Malcolm! I filed the ugettext_lazy problem under #11701 and attached a patch that fixes it by using force_unicode() on the format in DateWidget. FWIW, users could also workaround this thing by using their forms __init__, like so: def __init__(self, *args, **kwargs):

Re: DateInput widget, format attr & ugettext

2009-08-06 Thread Malcolm Tredinnick
On Fri, 2009-08-07 at 11:56 +1000, Malcolm Tredinnick wrote: > On Thu, 2009-08-06 at 08:06 -0700, cArkraus wrote: > > Hey all, > > > > I cant seem to get my (non-model-)forms datefield localized. > > > > Here's my first attempt: > > some_date =

Re: DateInput widget, format attr & ugettext

2009-08-06 Thread Malcolm Tredinnick
On Thu, 2009-08-06 at 08:06 -0700, cArkraus wrote: > Hey all, > > I cant seem to get my (non-model-)forms datefield localized. > > Here's my first attempt: > some_date = fields.DateField(widget=widgets.DateInput(format=ugettext > ('%d.%m.%Y'))) This would do the translation when the file is

DateInput widget, format attr & ugettext

2009-08-06 Thread cArkraus
Hey all, I cant seem to get my (non-model-)forms datefield localized. Here's my first attempt: some_date = fields.DateField(widget=widgets.DateInput(format=ugettext ('%d.%m.%Y'))) That's working fine, until the user switches his sessions language. Then, the date is still shown in the