views.generic.list.MultipleObjectTemplateResponseMixin

class django.views.generic.list.MultipleObjectTemplateResponseMixin A mixin class that performs template-based response rendering for views that operate upon a list of object instances. Requires that the view it is mixed with provides self.object_list, the list of object instances that the view is operating on. self.object_list may be, but is not required to be, a QuerySet. Extends TemplateResponseMixin Methods and Attributes template_name_suffix The suffix to append to the auto-generat

views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix

template_name_suffix The suffix to append to the auto-generated candidate template name. Default suffix is _list.

views.generic.list.MultipleObjectTemplateResponseMixin.get_template_names()

get_template_names() Returns a list of candidate template names. Returns the following list: the value of template_name on the view (if provided) <app_label>/<model_name><template_name_suffix>.html

views.generic.list.MultipleObjectMixin.queryset

queryset A QuerySet that represents the objects. If provided, the value of queryset supersedes the value provided for model. Warning queryset is a class attribute with a mutable value so care must be taken when using it directly. Before using it, either call its all() method or retrieve it with get_queryset() which takes care of the cloning behind the scenes.

views.i18n.JavaScriptCatalog

class JavaScriptCatalog [source] A view that produces a JavaScript code library with functions that mimic the gettext interface, plus an array of translation strings. Attributes domain Translation domain containing strings to add in the view output. Defaults to 'djangojs'. packages A list of application names among installed applications. Those apps should contain a locale directory. All those catalogs plus all catalogs found in LOCALE_PATHS (which are always included) are merged in

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

paginate_queryset(queryset, page_size) Returns a 4-tuple containing (paginator, page, object_list, is_paginated). Constructed by paginating queryset into pages of size page_size. If the request contains a page argument, either as a captured URL argument or as a GET argument, object_list will correspond to the objects from that page.

views.generic.list.MultipleObjectMixin.paginate_by

paginate_by An integer specifying how many objects should be displayed per page. If this is given, the view will paginate objects with paginate_by objects per page. The view will expect either a page query string parameter (via request.GET) or a page variable specified in the URLconf.

views.generic.list.MultipleObjectMixin.paginate_orphans

paginate_orphans An integer specifying the number of “overflow” objects the last page can contain. This extends the paginate_by limit on the last page by up to paginate_orphans, in order to keep the last page from having a very small number of objects.

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