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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -