http.HttpResponse.delete_cookie()

HttpResponse.delete_cookie(key, path='/', domain=None) Deletes the cookie with the given key. Fails silently if the key doesn’t exist. Due to the way cookies work, path and domain should be the same values you used in set_cookie() – otherwise the cookie may not be deleted.

gis.gdal.SpatialReference.inverse_flattening

inverse_flattening Returns the inverse flattening of the ellipsoid for this spatial reference.

forms.Field.label

Field.label The label argument lets you specify the “human-friendly” label for this field. This is used when the Field is displayed in a Form. As explained in “Outputting forms as HTML” above, the default label for a Field is generated from the field name by converting all underscores to spaces and upper-casing the first letter. Specify label if that default behavior doesn’t result in an adequate label. Here’s a full example Form that implements label for two of its fields. We’ve specified a

gis.forms.MultiLineStringField

class MultiLineStringField

db.models.NullBooleanField

class NullBooleanField(**options) [source] Like a BooleanField, but allows NULL as one of the options. Use this instead of a BooleanField with null=True. The default form widget for this field is a NullBooleanSelect.

Advanced tutorial: How to write reusable apps

This advanced tutorial begins where Tutorial 7 left off. We’ll be turning our Web-poll into a standalone Python package you can reuse in new projects and share with other people. If you haven’t recently completed Tutorials 1–7, we encourage you to review these so that your example project matches the one described below. Reusability matters It’s a lot of work to design, build, test and maintain a web application. Many Python and Django projects share common problems. Wouldn’t it be great if we

db.models.BooleanField

class BooleanField(**options) [source] A true/false field. The default form widget for this field is a CheckboxInput. If you need to accept null values then use NullBooleanField instead. The default value of BooleanField is None when Field.default isn’t defined.

admin.InlineModelAdmin.raw_id_fields

InlineModelAdmin.raw_id_fields By default, Django’s admin uses a select-box interface (<select>) for fields that are ForeignKey. Sometimes you don’t want to incur the overhead of having to select all the related instances to display in the drop-down. raw_id_fields is a list of fields you would like to change into an Input widget for either a ForeignKey or ManyToManyField: class BookInline(admin.TabularInline): model = Book raw_id_fields = ("pages",)

forms.DecimalField

class DecimalField(**kwargs) [source] Default widget: NumberInput when Field.localize is False, else TextInput. Empty value: None Normalizes to: A Python decimal. Validates that the given value is a decimal. Leading and trailing whitespace is ignored. Error message keys: required, invalid, max_value, min_value, max_digits, max_decimal_places, max_whole_digits The max_value and min_value error messages may contain %(limit_value)s, which will be substituted by the appropriate limit. Simila

forms.MultiValueField

class MultiValueField(fields=(), **kwargs) [source] Default widget: TextInput Empty value: '' (an empty string) Normalizes to: the type returned by the compress method of the subclass. Validates the given value against each of the fields specified as an argument to the MultiValueField. Error message keys: required, invalid, incomplete Aggregates the logic of multiple fields that together produce a single value. This field is abstract and must be subclassed. In contrast with the single-va