db.models.Field.is_relation

Field.is_relation Boolean flag that indicates if a field contains references to one or more other models for its functionality (e.g. ForeignKey, ManyToManyField, OneToOneField, etc.).

sessions.base_session.AbstractBaseSession

class base_session.AbstractBaseSession New in Django 1.9. The abstract base session model. session_key Primary key. The field itself may contain up to 40 characters. The current implementation generates a 32-character string (a random sequence of digits and lowercase ASCII letters). session_data A string containing an encoded and serialized session dictionary. expire_date A datetime designating when the session expires. Expired sessions are not available to a user, however,

gis.gdal.OGRGeometry.geom_count

geom_count Returns the number of elements in this geometry: >>> polygon.geom_count 1

gis.gdal.SpatialReference.__getitem__()

__getitem__(target) Returns the value of the given string attribute node, None if the node doesn’t exist. Can also take a tuple as a parameter, (target, child), where child is the index of the attribute in the WKT. For example: >>> wkt = 'GEOGCS["WGS 84", DATUM["WGS_1984, ... AUTHORITY["EPSG","4326"]]') >>> srs = SpatialReference(wkt) # could also use 'WGS84', or 4326 >>> print(srs['GEOGCS']) WGS 84 >>> print(srs['DATUM']) WGS_1984 >>> print(srs['

Multiple databases

This topic guide describes Django’s support for interacting with multiple databases. Most of the rest of Django’s documentation assumes you are interacting with a single database. If you want to interact with multiple databases, you’ll need to take some additional steps. Defining your databases The first step to using more than one database with Django is to tell Django about the database servers you’ll be using. This is done using the DATABASES setting. This setting maps database aliases, whic

views.decorators.csrf.requires_csrf_token()

requires_csrf_token(view) Normally the csrf_token template tag will not work if CsrfViewMiddleware.process_view or an equivalent like csrf_protect has not run. The view decorator requires_csrf_token can be used to ensure the template tag does work. This decorator works similarly to csrf_protect, but never rejects an incoming request. Example: from django.views.decorators.csrf import requires_csrf_token from django.shortcuts import render @requires_csrf_token def my_view(request): c = {}

gis.gdal.SpatialReference.units

units Returns a 2-tuple of the units value and the units name and will automatically determines whether to return the linear or angular units.

sites.models.Site.domain

domain The fully qualified domain name associated with the website. For example, www.example.com. Changed in Django 1.9: The domain field was set to be unique.

gis.db.models.functions.Translate

class Translate(expression, x, y, z=0.0, **extra) Availability: PostGIS, SpatiaLite Accepts a single geographic field or expression and returns a geometry with its coordinates offset by the x, y, and optionally z numeric parameters.

conf.urls.static.static()

static.static(prefix, view=django.views.static.serve, **kwargs) Helper function to return a URL pattern for serving files in debug mode: from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # ... the rest of your URLconf goes here ... ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)