db.models.query.QuerySet.annotate()

annotate(*args, **kwargs) Annotates each object in the QuerySet with the provided list of query expressions. An expression may be a simple value, a reference to a field on the model (or any related models), or an aggregate expression (averages, sums, etc.) that has been computed over the objects that are related to the objects in the QuerySet. Each argument to annotate() is an annotation that will be added to each object in the QuerySet that is returned. The aggregation functions that are pr

auth.backends.ModelBackend.get_user_permissions()

get_user_permissions(user_obj, obj=None) Returns the set of permission strings the user_obj has from their own user permissions. Returns an empty set if is_anonymous or is_active is False.

template.Library.inclusion_tag()

django.template.Library.inclusion_tag() Another common type of template tag is the type that displays some data by rendering another template. For example, Django’s admin interface uses custom template tags to display the buttons along the bottom of the “add/change” form pages. Those buttons always look the same, but the link targets change depending on the object being edited – so they’re a perfect case for using a small template that is filled with details from the current object. (In the

views.generic.dates.BaseDateListView.date_list_period

date_list_period Optional A string defining the aggregation period for date_list. It must be one of 'year' (default), 'month', or 'day'.

gis.geos.GEOSGeometry.length

GEOSGeometry.length Returns the length of this geometry (e.g., 0 for a Point, the length of a LineString, or the circumference of a Polygon).

gis.gdal.SpatialReference.srid

srid Returns the SRID of top-level authority, or None if undefined.

forms.TimeField.input_formats

input_formats A list of formats used to attempt to convert a string to a valid datetime.time object. If no input_formats argument is provided, the default input formats are: '%H:%M:%S', # '14:30:59' '%H:%M', # '14:30'

gis.gdal.OGRGeomType.name

name Returns a short-hand string form of the OGR Geometry type: >>> gt1.name 'Polygon'

auth.forms.AuthenticationForm.confirm_login_allowed()

confirm_login_allowed(user) By default, AuthenticationForm rejects users whose is_active flag is set to False. You may override this behavior with a custom policy to determine which users can log in. Do this with a custom form that subclasses AuthenticationForm and overrides the confirm_login_allowed() method. This method should raise a ValidationError if the given user may not log in. For example, to allow all users to log in regardless of “active” status: from django.contrib.auth.forms imp

auth.mixins.PermissionRequiredMixin.get_permission_required()

get_permission_required() Returns an iterable of permission names used by the mixin. Defaults to the permission_required attribute, converted to a tuple if necessary.