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.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.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.post()

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

views.generic.edit.ProcessFormView.put()

put(*args, **kwargs) The PUT action is also handled and just passes all parameters through to post().

views.generic.edit.UpdateView

class django.views.generic.edit.UpdateView A view that displays a form for editing an existing object, redisplaying the form with validation errors (if there are any) and saving changes to the object. This uses a form automatically generated from the object’s model class (unless a form class is manually specified). Ancestors (MRO) This view inherits methods and attributes from the following views: django.views.generic.detail.SingleObjectTemplateResponseMixin django.views.generic.base.Templat

views.generic.edit.UpdateView.object

object When using UpdateView you have access to self.object, which is the object being updated. Example myapp/views.py: from django.views.generic.edit import UpdateView from myapp.models import Author class AuthorUpdate(UpdateView): model = Author fields = ['name'] template_name_suffix = '_update_form' Example myapp/author_update_form.html: <form action="" method="post">{% csrf_token %} {{ form.as_p }} <input type="submit" value="Update" /> </form>

views.generic.edit.UpdateView.template_name_suffix

template_name_suffix The UpdateView page displayed to a GET request uses a template_name_suffix of '_form'. For example, changing this attribute to '_update_form' for a view updating objects for the example Author model would cause the default template_name to be 'myapp/author_update_form.html'.

views.generic.list.BaseListView

class django.views.generic.list.BaseListView A base view for displaying a list of objects. It is not intended to be used directly, but rather as a parent class of the django.views.generic.list.ListView or other views representing lists of objects. Ancestors (MRO) This view inherits methods and attributes from the following views: django.views.generic.list.MultipleObjectMixin django.views.generic.base.View Methods get(request, *args, **kwargs) Adds object_list to the context. If allow_em

views.generic.list.BaseListView.get()

get(request, *args, **kwargs) Adds object_list to the context. If allow_empty is True then display an empty list. If allow_empty is False then raise a 404 error.