Django - Add a field to a form that not should be in a model -
i have form based on model, want add 1 more field. field should not on model (or can be, don't want have column , saved on database).
this field passed view , define action view take (will used on if on view).
you can add additional fields modelform:
class fooform(modelform): extra_stuff = forms.charfield() class meta: model = foo fields = ['bar', 'biz']
Comments
Post a Comment