[Answered ]-Django – Add a field to a form that not should be in a model

2👍

You can add additional fields to a ModelForm:

class FooForm(ModelForm):
    extra_stuff = forms.CharField()

    class Meta:
        model = Foo
        fields = ['bar', 'biz']

Leave a comment