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.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.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.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.generic.list.MultipleObjectMixin.paginator_class

paginator_class The paginator class to be used for pagination. By default, django.core.paginator.Paginator is used. If the custom paginator class doesn’t have the same constructor interface as django.core.paginator.Paginator, you will also need to provide an implementation for get_paginator().

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_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.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.page_kwarg

page_kwarg A string specifying the name to use for the page parameter. The view will expect this parameter to be available either as a query string parameter (via request.GET) or as a kwarg variable specified in the URLconf. Defaults to page.