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

Re: Initial values in form fields

2008-09-03 Thread cArkraus
ain! : ) @ Bruno Thx for the comp.lang.py tip ...definitely will have a look! On Sep 2, 10:11 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 2 sep, 19:10, cArkraus <[EMAIL PROTECTED]> wrote: > > > > > Hey everyone, > > > am pretty new to Django and

Initial values in form fields

2008-09-02 Thread cArkraus
Hey everyone, am pretty new to Django and Python in general. I seem not be able to let the 'initial' value of a form-field be calculated by its parent form. I'd like to do sth like this: class AbstractForm(forms.Form): some_attr = "foo" def some_method(self): if self.some_attr