postgres.forms.RangeWidget.decompress()

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.RangeWidget.base_widget

base_widget A RangeWidget comprises a 2-tuple of base_widget.

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.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.FloatRangeField

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

postgres.forms.DateTimeRangeField

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

postgres.forms.DateRangeField

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

postgres.fields.RangeField.range_type

range_type The psycopg2 range type to use.