views.generic.edit.FormMixin.get_form_class()

get_form_class() Retrieve the form class to instantiate. By default form_class.

views.generic.edit.FormMixin.get_form()

get_form(form_class=None) Instantiate an instance of form_class using get_form_kwargs(). If form_class isn’t provided get_form_class() will be used.

views.generic.edit.FormMixin.get_context_data()

get_context_data(**kwargs) New in Django 1.9. Calls get_form() and adds the result to the context data with the name ‘form’.

views.generic.edit.FormMixin.form_valid()

form_valid(form) Redirects to get_success_url().

views.generic.edit.FormMixin.form_invalid()

form_invalid(form) Renders a response, providing the invalid form as context.

views.generic.edit.FormMixin.form_class

form_class The form class to instantiate.

views.generic.edit.FormMixin

class django.views.generic.edit.FormMixin A mixin class that provides facilities for creating and displaying forms. Mixins django.views.generic.base.ContextMixin Methods and Attributes initial A dictionary containing initial data for the form. form_class The form class to instantiate. success_url The URL to redirect to when the form is successfully processed. prefix The prefix for the generated form. get_initial() Retrieve initial data for the form. By default, r

views.generic.edit.DeletionMixin.success_url

success_url The url to redirect to when the nominated object has been successfully deleted. success_url may contain dictionary string formatting, which will be interpolated against the object’s field attributes. For example, you could use success_url="/parent/{parent_id}/" to redirect to a URL composed out of the parent_id field on a model.

views.generic.edit.DeletionMixin.get_success_url()

get_success_url() Returns the url to redirect to when the nominated object has been successfully deleted. Returns success_url by default.

views.generic.edit.DeletionMixin

class django.views.generic.edit.DeletionMixin Enables handling of the DELETE http action. Methods and Attributes success_url The url to redirect to when the nominated object has been successfully deleted. success_url may contain dictionary string formatting, which will be interpolated against the object’s field attributes. For example, you could use success_url="/parent/{parent_id}/" to redirect to a URL composed out of the parent_id field on a model. get_success_url() Returns the u