My code is below, I'm actually redefining my vehicle_make so that the legacy Could change its initial value in the millisecond (update format). I'm looking for a dry outlook I was trying to field ['filename']. Initial = "value", but it gives mainstream. BaseInputForm (forms.ModelForm): class meta: model = vehicle exclusion = ('vehicle_make', 'vehicle_model') def __init __ (self, * args, ** kwargs): super (SearchInforms, itself) .__ init __ (* Args, ** kwargs) self.fields ['vehicle_make'] = forms.ChoiceField (initial = "NA", label = "car build", option =, widget = Select forms (etters = {'id': 'creates'}) class CreateForm (BaseInputForm): Close class UpdateForm (BaseInputForm): def __init __ (self, * args, ** kwargs): super (SearchUpdateForm, self ) .__ init __ (* args, ** kwargs) self.vehicle_make = self.instance.vehicle_make self.fields ['vehicle_make'] = forms.ChoiceField (start Select (= '' id ':' creates'}) # self field ['vehicle_make']. Initial = "auto =" .hhicle_make, label = "make car", option =, create widget = forms. self.instance.vehicle_model
Try:
self.fields ['fieldname']. initial = "value" has its own keyword that you are missing
Comments
Post a Comment