db.models.query.QuerySet.first()

first() Returns the first object matched by the queryset, or None if there is no matching object. If the QuerySet has no ordering defined, then the queryset is automatically ordered by the primary key. Example: p = Article.objects.order_by('title', 'pub_date').first() Note that first() is a convenience method, the following code sample is equivalent to the above example: try: p = Article.objects.order_by('title', 'pub_date')[0] except IndexError: p = None

forms.SelectMultiple

class SelectMultiple [source] Similar to Select, but allows multiple selection: <select multiple='multiple'>...</select>

forms.Form.use_required_attribute

Form.use_required_attribute New in Django 1.10. When set to True (the default), required form fields will have the required HTML attribute. Formsets instantiate forms with use_required_attribute=False to avoid incorrect browser validation when adding and deleting forms from a formset.

core.files.storage.FileSystemStorage.file_permissions_mode

file_permissions_mode The file system permissions that the file will receive when it is saved. Defaults to FILE_UPLOAD_PERMISSIONS.

template.Context

class Context(dict_=None) [source] This class lives at django.template.Context. The constructor takes two optional arguments: A dictionary mapping variable names to variable values. The name of the current application. This application name is used to help resolve namespaced URLs. If you’re not using namespaced URLs, you can ignore this argument. For details, see Playing with Context objects below.

gis.geos.GEOSGeometry.num_coords

GEOSGeometry.num_coords Returns the number of coordinates in the geometry.

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

BaseDatabaseSchemaEditor.alter_db_table(model, old_db_table, new_db_table) [source] Renames the model’s table from old_db_table to new_db_table.

sessions.backends.base.SessionBase.__contains__()

__contains__(key) Example: 'fav_color' in request.session

views.generic.edit.ProcessFormView.get()

get(request, *args, **kwargs) Renders a response using a context created with get_context_data(). Changed in Django 1.9: Construction of the form was moved from this method to get_context_data().

gis.db.models.GeometryCollectionField

class GeometryCollectionField