postgres.forms.SimpleArrayField

class SimpleArrayField(base_field, delimiter=', ', max_length=None, min_length=None) [source] A simple field which maps to an array. It is represented by an HTML <input>. base_field This is a required argument. It specifies the underlying form field for the array. This is not used to render any HTML, but it is used to process the submitted data and validate it. For example: >>> from django.contrib.postgres.forms import SimpleArrayField >>> from django import forms

postgres.forms.RangeWidget

class RangeWidget(base_widget, attrs=None) Widget used by all of the range fields. Based on MultiWidget. RangeWidget has one required argument: base_widget A RangeWidget comprises a 2-tuple of base_widget. decompress(value) Takes a single “compressed” value of a field, for example a DateRangeField, and returns a tuple representing and lower and upper bound.

postgres.forms.JSONField

class JSONField [source] A field which accepts JSON encoded data for a JSONField. It is represented by an HTML <textarea>. User friendly forms JSONField is not particularly user friendly in most cases, however it is a useful way to format data from a client-side widget for submission to the server.

postgres.forms.RangeWidget.base_widget

base_widget A RangeWidget comprises a 2-tuple of base_widget.

postgres.forms.DateTimeRangeField

class DateTimeRangeField [source] Based on DateTimeField and translates its input into DateTimeTZRange. Default for DateTimeRangeField.

postgres.forms.FloatRangeField

class FloatRangeField [source] Based on FloatField and translates its input into NumericRange. Default for FloatRangeField.

postgres.fields.RangeField.range_type

range_type The psycopg2 range type to use.

postgres.forms.IntegerRangeField

class IntegerRangeField [source] Based on IntegerField and translates its input into NumericRange. Default for IntegerRangeField and BigIntegerRangeField.

postgres.forms.HStoreField

class HStoreField [source] A field which accepts JSON encoded data for an HStoreField. It will cast all the values to strings. It is represented by an HTML <textarea>. User friendly forms HStoreField is not particularly user friendly in most cases, however it is a useful way to format data from a client-side widget for submission to the server. Note On occasions it may be useful to require or restrict the keys which are valid for a given field. This can be done using the KeysValidat

postgres.forms.DateRangeField

class DateRangeField [source] Based on DateField and translates its input into DateRange. Default for DateRangeField.