postgres.functions.TransactionNow

class TransactionNow [source] New in Django 1.9. Returns the date and time on the database server that the current transaction started. If you are not in a transaction it will return the date and time of the current statement. This is a complement to django.db.models.functions.Now, which returns the date and time of the current statement. Note that only the outermost call to atomic() sets up a transaction and thus sets the time that TransactionNow() will return; nested calls create savepoi

postgres.forms.SplitArrayField.size

size This is the fixed number of times the underlying field will be used.

postgres.forms.SplitArrayField.remove_trailing_nulls

remove_trailing_nulls By default, this is set to False. When False, each value from the repeated fields is stored. When set to True, any trailing values which are blank will be stripped from the result. If the underlying field has required=True, but remove_trailing_nulls is True, then null values are only allowed at the end, and will be stripped. Some examples: SplitArrayField(IntegerField(required=True), size=3, remove_trailing_nulls=False) ['1', '2', '3'] # -> [1, 2, 3] ['1', '2', '']

postgres.forms.SplitArrayField.base_field

base_field This is a required argument. It specifies the form field to be repeated.

postgres.forms.SplitArrayField

class SplitArrayField(base_field, size, remove_trailing_nulls=False) [source] This field handles arrays by reproducing the underlying field a fixed number of times. base_field This is a required argument. It specifies the form field to be repeated. size This is the fixed number of times the underlying field will be used. remove_trailing_nulls By default, this is set to False. When False, each value from the repeated fields is stored. When set to True, any trailing values which

postgres.forms.SimpleArrayField.min_length

min_length This is an optional argument which validates that the array reaches at least the stated length. User friendly forms SimpleArrayField 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.SimpleArrayField.max_length

max_length This is an optional argument which validates that the array does not exceed the stated length.

postgres.forms.SimpleArrayField.delimiter

delimiter This is an optional argument which defaults to a comma: ,. This value is used to split the submitted data. It allows you to chain SimpleArrayField for multidimensional data: >>> from django.contrib.postgres.forms import SimpleArrayField >>> from django import forms >>> class GridForm(forms.Form): ... places = SimpleArrayField(SimpleArrayField(IntegerField()), delimiter='|') >>> form = GridForm({'places': '1,2|2,1|4,3'}) >>> form.is

postgres.forms.SimpleArrayField.base_field

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 >>> class NumberListForm(forms.Form): ... numbers = SimpleArrayField(forms.IntegerField()) >>> form = NumberListForm({'numbers': '1,2,3'}) >>> form

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