views.generic.dates.YearArchiveView

class YearArchiveView [source] A yearly archive page showing all available months in a given year. Objects with a date in the future are not displayed unless you set allow_future to True. Ancestors (MRO) django.views.generic.list.MultipleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.dates.BaseYearArchiveView django.views.generic.dates.YearMixin django.views.generic.dates.BaseDateListView django.views.generic.list.MultipleObjectMixin django.v

Class-based views

A view is a callable which takes a request and returns a response. This can be more than just a function, and Django provides an example of some classes which can be used as views. These allow you to structure your views and reuse code by harnessing inheritance and mixins. There are also some generic views for simple tasks which we’ll get to later, but you may want to design your own structure of reusable views which suits your use case. For full details, see the class-based views reference doc

utils.translation.gettext_noop()

gettext_noop(message) [source]

Aggregation

The topic guide on Django’s database-abstraction API described the way that you can use Django queries that create, retrieve, update and delete individual objects. However, sometimes you will need to retrieve values that are derived by summarizing or aggregating a collection of objects. This topic guide describes the ways that aggregate values can be generated and returned using Django queries. Throughout this guide, we’ll refer to the following models. These models are used to track the invent

admin.InlineModelAdmin

class InlineModelAdmin

forms.URLField.max_length

max_length

views.generic.base.TemplateResponseMixin.template_name

template_name The full name of a template to use as defined by a string. Not defining a template_name will raise a django.core.exceptions.ImproperlyConfigured exception.

sessions.backends.base.SessionBase.pop()

pop(key, default=__not_given) Example: fav_color = request.session.pop('fav_color', 'blue')

db.backends.base.schema.BaseDatabaseSchemaEditor.alter_db_tablespace()

BaseDatabaseSchemaEditor.alter_db_tablespace(model, old_db_tablespace, new_db_tablespace) [source] Moves the model’s table from one tablespace to another.

db.models.Options.verbose_name

Options.verbose_name A human-readable name for the object, singular: verbose_name = "pizza" If this isn’t given, Django will use a munged version of the class name: CamelCase becomes camel case.