er calling make_car_form with
extra=True or extra=False.
Regards,
Marek
2009/3/18 Thomas Guettler
>
> Hi,
>
> your code looks correct.
>
> You can try to debug it. Maybe insert
> assert False, self.fields into __init__()
> Do the fields from the model exist?
>
>
Hi, I would like to add a field to a form dynamically. I'm using Django
1.0.2.
Here's my view code:
class CarForm(ModelForm):
def __init__(self, *args, **kwargs):
super(CarForm, self).__init__(*args, **kwargs)
self.fields['extraField'] = forms.CharField()
class Meta:
2 matches
Mail list logo