forms.Form.has_changed()

Form.has_changed() Use the has_changed() method on your Form when you need to check if the form data has been changed from the initial data. >>> data = {'subject': 'hello', ... 'message': 'Hi there', ... 'sender': 'foo@example.com', ... 'cc_myself': True} >>> f = ContactForm(data, initial=data) >>> f.has_changed() False When the form is submitted, we reconstruct it and provide the original data so that the comparison can be done: >>&g

forms.BoundField.form

BoundField.form The Form instance this BoundField is bound to.

forms.Select.choices

choices This attribute is optional when the form field does not have a choices attribute. If it does, it will override anything you set here when the attribute is updated on the Field.

gis.gdal.Layer.field_widths

field_widths Returns a list of the maximum field widths for each of the fields in this layer: >>> layer.field_widths [80, 11, 24, 10]

auth.models.CustomUser

class models.CustomUser USERNAME_FIELD A string describing the name of the field on the User model that is used as the unique identifier. This will usually be a username of some kind, but it can also be an email address, or any other unique identifier. The field must be unique (i.e., have unique=True set in its definition), unless you use a custom authentication backend that can support non-unique usernames. In the following example, the field identifier is used as the identifying field:

admin.ModelAdmin.save_on_top

ModelAdmin.save_on_top Set save_on_top to add save buttons across the top of your admin change forms. Normally, the save buttons appear only at the bottom of the forms. If you set save_on_top, the buttons will appear both on the top and the bottom. By default, save_on_top is set to False.

test.SimpleTestCase.assertXMLNotEqual()

SimpleTestCase.assertXMLNotEqual(xml1, xml2, msg=None) [source] Asserts that the strings xml1 and xml2 are not equal. The comparison is based on XML semantics. See assertXMLEqual() for details. Output in case of error can be customized with the msg argument.

auth.models.User.is_superuser

is_superuser Boolean. Designates that this user has all permissions without explicitly assigning them.

gis.gdal.Field.type

type Returns the OGR type of this field, as an integer. The FIELD_CLASSES dictionary maps these values onto subclasses of Field: >>> city['Density'].type 2

auth.models.User.password

password Required. A hash of, and metadata about, the password. (Django doesn’t store the raw password.) Raw passwords can be arbitrarily long and can contain any character. See the password documentation.