As far as I can see the __init__ way of doing things creates a field
as opposed to a base_field. Given that this is done in the __init__
method every instance will have this field. Is there any disadvantage
in this? I suppose you could also have a base_field with the same name/
key. Looking at
On 2/18/07, paulh <[EMAIL PROTECTED]> wrote:
>
> Thanks for the replies. As always, reading the docs again teaches you
> a bit more than the first time; I now see that that initial was not
> what I was after.
>
> Arnaud, I think your method is more what I was after and as you say,
> it does
Thanks for the replies. As always, reading the docs again teaches you
a bit more than the first time; I now see that that initial was not
what I was after.
Arnaud, I think your method is more what I was after and as you say,
it does exactly what I wanted.
It seems to be much simpler than
On Feb 17, 7:05 pm, "paulh" <[EMAIL PROTECTED]> wrote:
> I feel the following should work:
> class Myform(forms.Form):
> ...publ = forms.ChoiceField(label='Publisher', required=False)
>
> and then in handler I should be able to set the choices dynamically
> by:
>
> def meth(request):
>
On 2/17/07, paulh <[EMAIL PROTECTED]> wrote:
>
> I feel the following should work:
> class Myform(forms.Form):
> ...publ = forms.ChoiceField(label='Publisher', required=False)
>
> and then in handler I should be able to set the choices dynamically
> by:
>
> def meth(request):
>
I feel the following should work:
class Myform(forms.Form):
...publ = forms.ChoiceField(label='Publisher', required=False)
and then in handler I should be able to set the choices dynamically
by:
def meth(request):
...frm=Myform(initial={'publ':((1,2),(2,3),(3,4)))}) #even if the
brackets are
6 matches
Mail list logo