views.generic.edit.ModelFormMixin.fields

fields A list of names of fields. This is interpreted the same way as the Meta.fields attribute of ModelForm. This is a required attribute if you are generating the form class automatically (e.g. using model). Omitting this attribute will result in an ImproperlyConfigured exception.

views.generic.edit.ModelFormMixin

class django.views.generic.edit.ModelFormMixin A form mixin that works on ModelForms, rather than a standalone form. Since this is a subclass of SingleObjectMixin, instances of this mixin have access to the model and queryset attributes, describing the type of object that the ModelForm is manipulating. If you specify both the fields and form_class attributes, an ImproperlyConfigured exception will be raised. Mixins django.views.generic.edit.FormMixin django.views.generic.detail.SingleObjectM

views.generic.edit.FormView

class django.views.generic.edit.FormView A view that displays a form. On error, redisplays the form with validation errors; on success, redirects to a new URL. Ancestors (MRO) This view inherits methods and attributes from the following views: django.views.generic.base.TemplateResponseMixin django.views.generic.edit.BaseFormView django.views.generic.edit.FormMixin django.views.generic.edit.ProcessFormView django.views.generic.base.View Example myapp/forms.py: from django import forms clas

views.generic.edit.FormMixin.success_url

success_url The URL to redirect to when the form is successfully processed.

views.generic.edit.FormMixin.prefix

prefix The prefix for the generated form.

views.generic.edit.FormMixin.initial

initial A dictionary containing initial data for the form.

views.generic.edit.FormMixin.get_success_url()

get_success_url() Determine the URL to redirect to when the form is successfully validated. Returns success_url by default.

views.generic.edit.FormMixin.get_prefix()

get_prefix() Determine the prefix for the generated form. Returns prefix by default.

views.generic.edit.FormMixin.get_initial()

get_initial() Retrieve initial data for the form. By default, returns a copy of initial.

views.generic.edit.FormMixin.get_form_kwargs()

get_form_kwargs() Build the keyword arguments required to instantiate the form. The initial argument is set to get_initial(). If the request is a POST or PUT, the request data (request.POST and request.FILES) will also be provided.