views.generic.list.MultipleObjectMixin.ordering

ordering A string or list of strings specifying the ordering to apply to the queryset. Valid values are the same as those for order_by().

views.generic.list.MultipleObjectMixin.model

model The model that this view will display data for. Specifying model = Foo is effectively the same as specifying queryset = Foo.objects.all(), where objects stands for Foo’s default manager.

views.generic.list.MultipleObjectMixin.get_queryset()

get_queryset() Get the list of items for this view. This must be an iterable and may be a queryset (in which queryset-specific behavior will be enabled).

views.generic.list.MultipleObjectMixin.get_paginator()

get_paginator(queryset, per_page, orphans=0, allow_empty_first_page=True) Returns an instance of the paginator to use for this view. By default, instantiates an instance of paginator_class.

views.generic.list.MultipleObjectMixin.get_paginate_orphans()

get_paginate_orphans() An integer specifying the number of “overflow” objects the last page can contain. By default this simply returns the value of paginate_orphans.

views.generic.list.MultipleObjectMixin.get_paginate_by()

get_paginate_by(queryset) Returns the number of items to paginate by, or None for no pagination. By default this simply returns the value of paginate_by.

views.generic.list.MultipleObjectMixin.get_ordering()

get_ordering() Returns a string (or iterable of strings) that defines the ordering that will be applied to the queryset. Returns ordering by default.

views.generic.list.MultipleObjectMixin.get_context_object_name()

get_context_object_name(object_list) Return the context variable name that will be used to contain the list of data that this view is manipulating. If object_list is a queryset of Django objects and context_object_name is not set, the context name will be the model_name of the model that the queryset is composed from, with postfix '_list' appended. For example, the model Article would have a context object named article_list.

views.generic.list.MultipleObjectMixin.get_context_data()

get_context_data(**kwargs) Returns context data for displaying the list of objects. Context object_list: The list of objects that this view is displaying. If context_object_name is specified, that variable will also be set in the context, with the same value as object_list. is_paginated: A boolean representing whether the results are paginated. Specifically, this is set to False if no page size has been specified, or if the available objects do not span multiple pages. paginator: An insta

views.generic.list.MultipleObjectMixin.get_allow_empty()

get_allow_empty() Return a boolean specifying whether to display the page if no objects are available. If this method returns False and no objects are available, the view will raise a 404 instead of displaying an empty page. By default, this is True.