views.generic.edit.ProcessFormView.post()

post(request, *args, **kwargs) Constructs a form, checks the form for validity, and handles it accordingly.

views.generic.edit.ProcessFormView.get()

get(request, *args, **kwargs) Renders a response using a context created with get_context_data(). Changed in Django 1.9: Construction of the form was moved from this method to get_context_data().

views.generic.edit.ProcessFormView

class django.views.generic.edit.ProcessFormView A mixin that provides basic HTTP GET and POST workflow. Note This is named ‘ProcessFormView’ and inherits directly from django.views.generic.base.View, but breaks if used independently, so it is more of a mixin. Extends django.views.generic.base.View Methods and Attributes get(request, *args, **kwargs) Renders a response using a context created with get_context_data(). Changed in Django 1.9: Construction of the form was moved from this

views.generic.edit.ModelFormMixin.success_url

success_url The URL to redirect to when the form is successfully processed. success_url may contain dictionary string formatting, which will be interpolated against the object’s field attributes. For example, you could use success_url="/polls/{slug}/" to redirect to a URL composed out of the slug field on a model.

views.generic.edit.ModelFormMixin.model

model A model class. Can be explicitly provided, otherwise will be determined by examining self.object or queryset.

views.generic.edit.ModelFormMixin.get_success_url()

get_success_url() Determine the URL to redirect to when the form is successfully validated. Returns django.views.generic.edit.ModelFormMixin.success_url if it is provided; otherwise, attempts to use the get_absolute_url() of the object.

views.generic.edit.ModelFormMixin.get_form_kwargs()

get_form_kwargs() Add the current instance (self.object) to the standard get_form_kwargs().

views.generic.edit.ModelFormMixin.get_form_class()

get_form_class() Retrieve the form class to instantiate. If form_class is provided, that class will be used. Otherwise, a ModelForm will be instantiated using the model associated with the queryset, or with the model, depending on which attribute is provided.

views.generic.edit.ModelFormMixin.form_valid()

form_valid(form) Saves the form instance, sets the current object for the view, and redirects to get_success_url().

views.generic.edit.ModelFormMixin.form_invalid()

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