Django: dynamic form generation
So I have a form with a function for adding fields:
class BaseArticleFormSet(BaseFormSet):
def add_fields(self, form, index):
super(BaseArticleFormSet, self).add_fields(form, index)
form.fields["new_field"] = forms.CharField()
It lets to add only CharField. Are there any ways to let user add
different types of a field?
Thanks a lot.
No comments:
Post a Comment