messages.storage.base.BaseStorage

class storage.base.BaseStorage To write your own storage class, subclass the BaseStorage class in django.contrib.messages.storage.base and implement the _get and _store methods.

utils.encoding.smart_str()

smart_str(s, encoding='utf-8', strings_only=False, errors='strict') Alias of smart_bytes() on Python 2 and smart_text() on Python 3. This function returns a str or a lazy string. For instance, this is suitable for writing to sys.stdout on Python 2 and 3.

gis.geos.MultiLineString.closed

closed New in Django 1.10. Returns True if and only if all elements are closed. Requires GEOS 3.5.

gis.geos.GEOSGeometry.valid

GEOSGeometry.valid Returns a boolean indicating whether the geometry is valid.

db.models.query.QuerySet.order_by()

order_by(*fields) By default, results returned by a QuerySet are ordered by the ordering tuple given by the ordering option in the model’s Meta. You can override this on a per-QuerySet basis by using the order_by method. Example: Entry.objects.filter(pub_date__year=2005).order_by('-pub_date', 'headline') The result above will be ordered by pub_date descending, then by headline ascending. The negative sign in front of "-pub_date" indicates descending order. Ascending order is implied. To ord

Using mixins with class-based views

Caution This is an advanced topic. A working knowledge of Django’s class-based views is advised before exploring these techniques. Django’s built-in class-based views provide a lot of functionality, but some of it you may want to use separately. For instance, you may want to write a view that renders a template to make the HTTP response, but you can’t use TemplateView; perhaps you need to render a template only on POST, with GET doing something else entirely. While you could use TemplateRespo

gis.gdal.Layer.fields

fields Returns a list of the names of each of the fields in this layer: >>> layer.fields ['Name', 'Population', 'Density', 'Created'] Returns a list of the data types of each of the fields in this layer. These are subclasses of Field, discussed below: >>> [ft.__name__ for ft in layer.field_types] ['OFTString', 'OFTReal', 'OFTReal', 'OFTDate']

views.generic.edit.FormMixin.form_invalid()

form_invalid(form) Renders a response, providing the invalid form as context.

gis.db.models.functions.SymDifference

class SymDifference(expr1, expr2, **extra) Availability: MySQL (≥ 5.6.1), PostGIS, Oracle, SpatiaLite Accepts two geographic fields or expressions and returns the geometric symmetric difference (union without the intersection) between the given parameters. Changed in Django 1.10: MySQL support was added.

redirects.middleware.RedirectFallbackMiddleware.response_gone_class

response_gone_class The HttpResponse class used when a Redirect is not found for the requested path or has a blank new_path value. Defaults to HttpResponseGone.