Hello All,
I am newbie in django and I will very thankful to you if you help me
in this regard.
I want to pass list of fields from view to Meta class of FormModel.
Please check this example.
view.py:
fields = [name, email, phone]
individual_form = IndividualForm(fields)
forms.py
class IndForm(forms.ModelForm):
class Meta:
model = Ind
fields = (
'name',
'email',
'phone',
)
I want to access view fields list into forms Meta class. I am not sure
I can do this or not.
Any idea! how can I do this?
Regards,
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.