Re: Initial values in form fields

2008-09-03 Thread cArkraus
@Daniel: thanks a lot - that did the trick! > I'm not sure I really understand what you want to do here Fyi. I´m working on a travel site, where I need quite some different travel search forms. Whereas some fields in these forms are common(eg. number of travelers, destination,...) some fields need

Re: Initial values in form fields

2008-09-02 Thread bruno desthuilliers
On 2 sep, 19:10, cArkraus <[EMAIL PROTECTED]> wrote: > 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): > so

Re: Initial values in form fields

2008-09-02 Thread Daniel Roseman
On Sep 2, 6:10 pm, cArkraus <[EMAIL PROTECTED]> wrote: > 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): >

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