gis.geos.GEOSGeometry.empty

GEOSGeometry.empty Returns whether or not the set of points in the geometry is empty.

db.models.Func.arg_joiner

arg_joiner A class attribute that denotes the character used to join the list of expressions together. Defaults to ', '.

db.models.functions.datetime.ExtractDay

class ExtractDay(expression, tzinfo=None, **extra) [source] lookup_name = 'day'

contenttypes.admin.GenericInlineModelAdmin.ct_fk_field

ct_fk_field The name of the integer field that represents the ID of the related object. Defaults to object_id.

core.management.BaseCommand.style

BaseCommand.style An instance attribute that helps create colored output when writing to stdout or stderr. For example: self.stdout.write(self.style.SUCCESS('...')) See Syntax coloring to learn how to modify the color palette and to see the available styles (use uppercased versions of the “roles” described in that section). If you pass the --no-color option when running your command, all self.style() calls will return the original string uncolored.

gis.feeds.W3CGeoFeed

class W3CGeoFeed [source] Note W3C Geo formatted feeds only support PointField geometries.

Form handling with class-based views

Form processing generally has 3 paths: Initial GET (blank or prepopulated form) POST with invalid data (typically redisplay form with errors) POST with valid data (process the data and typically redirect) Implementing this yourself often results in a lot of repeated boilerplate code (see Using a form in a view). To help avoid this, Django provides a collection of generic class-based views for form processing. Basic forms Given a simple contact form: from django import forms class ContactForm

db.models.ManyToManyField.db_table

ManyToManyField.db_table The name of the table to create for storing the many-to-many data. If this is not provided, Django will assume a default name based upon the names of: the table for the model defining the relationship and the name of the field itself.

db.models.query.QuerySet.defer()

defer(*fields) In some complex data-modeling situations, your models might contain a lot of fields, some of which could contain a lot of data (for example, text fields), or require expensive processing to convert them to Python objects. If you are using the results of a queryset in some situation where you don’t know if you need those particular fields when you initially fetch the data, you can tell Django not to retrieve them from the database. This is done by passing the names of the field

test.runner.DiscoverRunner.test_runner

DiscoverRunner.test_runner This is the class of the low-level test runner which is used to execute the individual tests and format the results. By default it is set to unittest.TextTestRunner. Despite the unfortunate similarity in naming conventions, this is not the same type of class as DiscoverRunner, which covers a broader set of responsibilities. You can override this attribute to modify the way tests are run and reported.