gis.gdal.OGRGeometry.geos

geos Returns a GEOSGeometry object corresponding to this geometry.

views.generic.list.MultipleObjectMixin.allow_empty

allow_empty A boolean specifying whether to display the page if no objects are available. If this is False and no objects are available, the view will raise a 404 instead of displaying an empty page. By default, this is True.

views.generic.detail.SingleObjectMixin.slug_url_kwarg

slug_url_kwarg The name of the URLConf keyword argument that contains the slug. By default, slug_url_kwarg is 'slug'.

messages.storage.cookie.CookieStorage

class storage.cookie.CookieStorage This class stores the message data in a cookie (signed with a secret hash to prevent manipulation) to persist notifications across requests. Old messages are dropped if the cookie data size would exceed 2048 bytes.

gis.gdal.GDALRaster.bands

bands List of all bands of the source, as GDALBand instances. >>> rst = GDALRaster({"width": 1, "height": 2, 'srid': 4326, ... "bands": [{"data": [0, 1]}, {"data": [2, 3]}]}) >>> len(rst.bands) 2 >>> rst.bands[1].data() array([[ 2., 3.]], dtype=float32)

views.generic.base.View.options()

options(request, *args, **kwargs) Handles responding to requests for the OPTIONS HTTP verb. Returns a response with the Allow header containing a list of the view’s allowed HTTP method names.

views.generic.detail.SingleObjectMixin.model

model The model that this view will display data for. Specifying model = Foo is effectively the same as specifying queryset = Foo.objects.all(), where objects stands for Foo’s default manager.

utils.feedgenerator.SyndicationFeed.write()

write(outfile, encoding) [source] Outputs the feed in the given encoding to outfile, which is a file-like object. Subclasses should override this.

db.models.Lookup.lhs

lhs The left-hand side - what is being looked up. The object must follow the Query Expression API.

Many-to-many relationships

To define a many-to-many relationship, use ManyToManyField. In this example, an Article can be published in multiple Publication objects, and a Publication has multiple Article objects: from django.db import models class Publication(models.Model): title = models.CharField(max_length=30) def __str__(self): # __unicode__ on Python 2 return self.title class Meta: ordering = ('title',) class Article(models.Model): headline = models.CharField(max_leng