core.files.storage.Storage.delete()

delete(name) [source] Deletes the file referenced by name. If deletion is not supported on the target storage system this will raise NotImplementedError instead

forms.Form.non_field_errors()

Form.non_field_errors() This method returns the list of errors from Form.errors that aren’t associated with a particular field. This includes ValidationErrors that are raised in Form.clean() and errors added using Form.add_error(None, "...").

postgres.aggregates.ArrayAgg

class ArrayAgg(expression, **extra) [source] Returns a list of values, including nulls, concatenated into an array.

postgres.validators.KeysValidator

class KeysValidator(keys, strict=False, messages=None) [source] Validates that the given keys are contained in the value. If strict is True, then it also checks that there are no other keys present. The messages passed should be a dict containing the keys missing_keys and/or extra_keys. Note Note that this checks only for the existence of a given key, not that the value of a key is non-empty.

db.connection.creation.destroy_test_db()

destroy_test_db(old_database_name, verbosity=1, keepdb=False) Destroys the database whose name is the value of NAME in DATABASES, and sets NAME to the value of old_database_name. The verbosity argument has the same behavior as for DiscoverRunner. If the keepdb argument is True, then the connection to the database will be closed, but the database will not be destroyed.

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.

db.models.ManyToManyField.related_query_name

ManyToManyField.related_query_name Same as ForeignKey.related_query_name.

Performance and optimization

This document provides an overview of techniques and tools that can help get your Django code running more efficiently - faster, and using fewer system resources. Introduction Generally one’s first concern is to write code that works, whose logic functions as required to produce the expected output. Sometimes, however, this will not be enough to make the code work as efficiently as one would like. In this case, what’s needed is something - and in practice, often a collection of things - to impr

gis.gdal.OGRGeometry.geom_name

geom_name Returns the name of the type of this geometry: >>> polygon.geom_name 'POLYGON'

sites.requests.RequestSite.__init__()

__init__(request) Sets the name and domain attributes to the value of get_host().