Multiple object mixins

Multiple object mixins

MultipleObjectMixin

class django.views.generic.list.MultipleObjectMixin

A mixin that can be used to display a list of objects.

If paginate_by is specified, Django will paginate the results returned by this. You can specify the page number in the URL in one of two ways:

  • Use the page parameter in the URLconf. For example, this is what your URLconf might look like:

    url(r'^objects/page(?P<page>[0-9]+)/$', PaginatedView.as_view()),
    
  • Pass the page number via the page query-string parameter. For example, a URL would look like this:

    /objects/?page=3
    

These val