class documentation

class FormMixin(ContextMixin):

Known subclasses: django.views.generic.edit.BaseDeleteView, django.views.generic.edit.BaseFormView, django.views.generic.edit.ModelFormMixin

View In Hierarchy

Provide a way to show and handle a form in a request.
Method form​_invalid If the form is invalid, render the invalid form.
Method form​_valid If the form is valid, redirect to the supplied URL.
Method get​_context​_data Insert the form into the context dict.
Method get​_form Return an instance of the form to be used in this view.
Method get​_form​_class Return the form class to use.
Method get​_form​_kwargs Return the keyword arguments for instantiating the form.
Method get​_initial Return the initial data to use for forms on this view.
Method get​_prefix Return the prefix to use for forms.
Method get​_success​_url Return the URL to redirect to after processing a valid form.
Class Variable form​_class Undocumented
Class Variable initial Undocumented
Class Variable prefix Undocumented
Class Variable success​_url Undocumented

Inherited from ContextMixin:

Class Variable extra​_context Undocumented
def form_invalid(self, form):
If the form is invalid, render the invalid form.
def form_valid(self, form):
If the form is valid, redirect to the supplied URL.
def get_context_data(self, **kwargs):
Insert the form into the context dict.
def get_form(self, form_class=None):
Return an instance of the form to be used in this view.
def get_form_class(self):
Return the form class to use.
def get_form_kwargs(self):
Return the keyword arguments for instantiating the form.
def get_initial(self):
Return the initial data to use for forms on this view.
def get_prefix(self):
Return the prefix to use for forms.
def get_success_url(self):
Return the URL to redirect to after processing a valid form.
form_class =

Undocumented

initial: dict =

Undocumented

prefix =

Undocumented

success_url =

Undocumented