forms.BoundField.form

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

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.Form.clean()

Form.clean() Implement a clean() method on your Form when you must add custom validation for fields that are interdependent. See Cleaning and validating fields that depend on each other for example usage.

forms.BoundField.auto_id

BoundField.auto_id The HTML ID attribute for this BoundField. Returns an empty string if Form.auto_id is False.

forms.DecimalField.decimal_places

decimal_places The maximum number of decimal places permitted.

views.generic.dates.WeekMixin.get_week()

get_week() [source] Returns the week for which this view will display data, as a string. Tries the following sources, in order: The value of the WeekMixin.week attribute. The value of the week argument captured in the URL pattern The value of the week GET query argument. Raises a 404 if no valid week specification can be found.

utils.dateparse.parse_time()

parse_time(value) [source] Parses a string and returns a datetime.time. UTC offsets aren’t supported; if value describes one, the result is None.

views.generic.edit.UpdateView.object

object When using UpdateView you have access to self.object, which is the object being updated. Example myapp/views.py: from django.views.generic.edit import UpdateView from myapp.models import Author class AuthorUpdate(UpdateView): model = Author fields = ['name'] template_name_suffix = '_update_form' Example myapp/author_update_form.html: <form action="" method="post">{% csrf_token %} {{ form.as_p }} <input type="submit" value="Update" /> </form>

gis.gdal.Feature.geom

geom Returns the geometry for this feature, as an OGRGeometry object: >>> city.geom.tuple (-104.609252, 38.255001)

db.models.fields.files.FieldFile.url

FieldFile.url A read-only property to access the file’s relative URL by calling the url() method of the underlying Storage class.