My instinct is to override __init__ on the form to provide choices to
it, which then overrides room_field.choices. Is that right, or is there
a cleaner or more idiomatic way of doing it?
(And by the way, Adrian, thanks for the select date widget. It's
exactly what I was looking for and has served as a great model for
similar widgets.)
--
Brian
__init__ is a right place to put this in, you can either pass it to
the form as one of the parameters or you can create the field in
__init__ itself, for example:
class MyForm( forms.form ):
def __init__( self, *args, **kwargs ):
super( MyForm, self ).__init__( *args, **kwargs )
self.fields['some_choice'] = forms.ChoiceField( choices=[ (o.id,
str(o) ) for o in Model.objects.all() ] )
>
> (And by the way, Adrian, thanks for the select date widget. It's
> exactly what I was looking for and has served as a great model for
> similar widgets.)
>
> --
> Brian
>
>
> >
>
--
Honza Král
E-Mail: Honza...@gmail.com
ICQ#: 107471613
Phone: +420 606 678585