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

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -