Reference PostgreSQL specific form fields and widgets FieldsRange Fields
classDateTimeRangeField : Based on DateTimeField and translates its input into django.db.backends.postgresql.psycopg_any.DateTimeTZRange. Default for DateTimeRangeField.
1305 sections across all versions Narrow to Django 6.0 (current) →
Reference PostgreSQL specific form fields and widgets FieldsRange Fields
classDateTimeRangeField : Based on DateTimeField and translates its input into django.db.backends.postgresql.psycopg_any.DateTimeTZRange. Default for DateTimeRangeField.
Reference PostgreSQL specific form fields and widgets FieldsRange Fields
classDateRangeField : Based on DateField and translates its input into django.db.backends.postgresql.psycopg_any.DateRange. Default for DateRangeField.
Reference PostgreSQL specific form fields and widgets Widgets
classRangeWidget(base_widget,attrs=None) : Widget used by all of the range fields. Based on MultiWidget.
Reference GeoDjango Forms API Form field classes
classGeometryField[source]
Reference GeoDjango Forms API Form field classes
classPointField[source]
Reference GeoDjango Forms API Form field classes
classLineStringField[source]
Reference GeoDjango Forms API Form field classes
classPolygonField[source]
Reference GeoDjango Forms API Form field classes
classMultiPointField[source]
Reference GeoDjango Forms API Form field classes
classMultiLineStringField[source]
Reference GeoDjango Forms API Form field classes
classMultiPolygonField[source]
Reference GeoDjango Forms API Form field classes
classGeometryCollectionField[source]
Reference Model forms Model form Meta API
ModelFormOptions.error_messages : A dictionary that maps a model field name to a dictionary of error message keys (null, blank, invalid, unique, etc.) mapped to custom error messages.
Reference Model forms Model form Meta API
ModelFormOptions.formfield_callback : A function or callable that takes a model field and returns a django.forms.Field object.
Reference Model forms Model form Meta API
ModelFormOptions.help_texts : A dictionary that maps a model field name to a help text string.
Reference Model forms Model form Meta API
ModelFormOptions.labels : A dictionary that maps a model field names to a label string.
Reference Model forms Model form Meta API
ModelFormOptions.model : Required. The django.db.models.Model to be used for the ModelForm.
Reference Model forms Model form Meta API
ModelFormOptions.widgets : A dictionary that maps a model field name to a django.forms.Widget.
Reference GeoDjango Forms API Form widgets
New in Django 6.0. To customize the base layer displayed in OpenLayers-based geometry widgets, define a new layer builder in a custom JavaScript file. For example: path-to-file.js Then, subclass a standard geometry widget and set the base_layer:
Reference JavaScript customizations in the admin Inline form events
jQuery handles JavaScript events but the reverse isn’t true. You could check for the presence of event.detail.formsetName and fall back to the old listener signature as follows: