gis.geos.GeometryCollection

class GeometryCollection(*args, **kwargs) GeometryCollection objects may be instantiated by passing in other GEOSGeometry as arguments, or a single sequence of GEOSGeometry objects: >>> poly = Polygon( ((0, 0), (0, 1), (1, 1), (0, 0)) ) >>> gc = GeometryCollection(Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly) >>> gc = GeometryCollection((Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly)) Changed in Django 1.10: In previous versions, an empty Geo

template.Template

class Template [source] This class lives at django.template.Template. The constructor takes one argument — the raw template code: from django.template import Template template = Template("My name is {{ my_name }}.") Behind the scenes The system only parses your raw template code once – when you create the Template object. From then on, it’s stored internally as a tree structure for performance. Even the parsing itself is quite fast. Most of the parsing happens via a single call to a singl

test.Response.context

context The template Context instance that was used to render the template that produced the response content. If the rendered page used multiple templates, then context will be a list of Context objects, in the order in which they were rendered. Regardless of the number of templates used during rendering, you can retrieve context values using the [] operator. For example, the context variable name could be retrieved using: >>> response = client.get('/foo/') >>> response.co

db.models.Count

class Count(expression, distinct=False, **extra) [source] Returns the number of objects that are related through the provided expression. Default alias: <field>__count Return type: int Has one optional argument: distinct If distinct=True, the count will only include unique instances. This is the SQL equivalent of COUNT(DISTINCT <field>). The default value is False.

admin.ModelAdmin.get_paginator()

ModelAdmin.get_paginator(request, queryset, per_page, orphans=0, allow_empty_first_page=True) [source] Returns an instance of the paginator to use for this view. By default, instantiates an instance of paginator.

db.models.Field.primary_key

Field.primary_key If True, this field is the primary key for the model. If you don’t specify primary_key=True for any field in your model, Django will automatically add an AutoField to hold the primary key, so you don’t need to set primary_key=True on any of your fields unless you want to override the default primary-key behavior. For more, see Automatic primary key fields. primary_key=True implies null=False and unique=True. Only one primary key is allowed on an object. The primary key fiel

auth.models.CustomUser.is_active

is_active A boolean attribute that indicates whether the user is considered “active”. This attribute is provided as an attribute on AbstractBaseUser defaulting to True. How you choose to implement it will depend on the details of your chosen auth backends. See the documentation of the is_active attribute on the built-in user model for details.

auth.models.User.check_password()

check_password(raw_password) Returns True if the given raw string is the correct password for the user. (This takes care of the password hashing in making the comparison.)

GeoJSON Serializer

GeoDjango provides a specific serializer for the GeoJSON format. See Serializing Django objects for more information on serialization. The GDAL library is required if any of the serialized geometries need coordinate transformations (that is if the geometry’s spatial reference system differs from the srid serializer option). Changed in Django 1.9: The GeoJSON serializer no longer needs GDAL if all geometries are in the same coordinate system as the srid serializer option. The geojson serialize

core.files.File.close()

close() [source] Close the file. In addition to the listed methods, File exposes the following attributes and methods of its file object: encoding, fileno, flush, isatty, newlines, read, readinto, readlines, seek, softspace, tell, truncate, writelines, xreadlines. If you are using Python 3, the seekable method is also available. Changed in Django 1.9: The seekable method was added.