… - naturaltime - template filter - NEVER (ModelAdmin.ShowFacets attribute) - never_cache() (in module django.views.decorators.cache) - new_file() (FileUploadHandler method) - new_objects (models.BaseModelFormSet attribute) - next_page (LoginView attribute) - (LogoutView attribute) - next_page_number() (Page method) - ngettext() (in module django.utils.translation) - ngettext_lazy() …
704 sections in Django dev Search all versions →
… - template filter | - urlencode() (in module django.utils.http) - (QueryDict method) - URLField (class in django.db.models) - (class in django.forms) - URLInput (class in django.forms) - urlize - template filter - URLIZE_ASSUME_HTTPS - setting - urlizetrunc - template filter …
| | | django.contrib.auth | Django's authentication framework. | | | django.contrib.auth.backends | Django's built-in authentication backend classes. | | | django.contrib.auth.forms | | | | django.contrib.auth.hashers | | | | django.contrib.auth.middleware | Authentication middleware.
… (GDALBand method) - date - field lookup type - template filter - date_attrs (SplitDateTimeWidget attribute) - date_field (DateMixin attribute) - DATE_FORMAT - setting - date_format (SplitDateTimeWidget attribute) - date_hierarchy (ModelAdmin attribute) - DATE_INPUT_FORMATS - setting - date_joined (models.User attribute) - …
… - GDALException - GDALRaster (class in django.contrib.gis.gdal) - generate_filename() (Storage method) - GeneratedField (class in django.db.models) - generic view - generic_inlineformset_factory() (in module django.contrib.contenttypes.forms) - GenericForeignKey (class in django.contrib.contenttypes.fields) - GenericInlineModelAdmin (class in django.contrib.contenttypes.admin) - GenericIPAddressField (class in django.db.models) - …
Reference Form fields
Field.validators The validators argument lets you provide a list of validation functions for this field. See the validators documentation for more information.
Reference Form fields
Naturally, the forms library comes with a set of Field classes that represent common validation needs. This section documents each built-in field. For each field, we describe the default widget used if you don’t specify widget.
Reference Form fields
classCharField(**kwargs)[source] : - Default widget: TextInput - Empty value: Whatever you’ve given as empty_value. - Normalizes to: A string. - Uses MaxLengthValidator and MinLengthValidator if max_length and min_length are provided. Otherwise, all inputs are valid.
Reference Form fields
classIntegerField(**kwargs)[source] : - Default widget: NumberInput when Field.localize is False, else TextInput. - Empty value: None - Normalizes to: A Python integer. - Validates that the given value is an integer.
Reference Form fields
classRegexField(**kwargs)[source] : - Default widget: TextInput - Empty value: Whatever you’ve given as empty_value. - Normalizes to: A string. - Uses RegexValidator to validate that the given value matches a certain regular expression. - Error message keys: required, invalid
Reference Form fields
classTypedChoiceField(**kwargs)[source] : Just like a ChoiceField, except TypedChoiceField takes two extra arguments, coerce and empty_value.
Reference Form fields
Field.error_messages The error_messages argument lets you override the default messages that the field will raise. Pass in a dictionary with keys matching the error messages you want to override.
Reference Form fields
classNullBooleanField(**kwargs)[source] : - Default widget: NullBooleanSelect - Empty value: None - Normalizes to: A Python True, False or None value. - Validates nothing (i.e., it never raises a ValidationError).
Reference Form fields
classComboField(**kwargs)[source] : - Default widget: TextInput - Empty value: '' (an empty string) - Normalizes to: A string. - Validates the given value against each of the fields specified as an argument to the ComboField.
Reference Form fields
classMultiValueField(fields=(),**kwargs)[source] : - Default widget: TextInput - Empty value: '' (an empty string) - Normalizes to: the type returned by the compress method of the subclass.
Reference Form fields
classJSONField(encoder=None,decoder=None,**kwargs)[source] : A field which accepts JSON encoded data for a JSONField.
Release notes Django 3.2.19 release notes
Uploading multiple files using one form field has never been supported by forms.FileField or forms.ImageField as only the last uploaded file was validated. Unfortunately, Uploading multiple files topic suggested otherwise.
Release notes Django 4.1.9 release notes
Uploading multiple files using one form field has never been supported by forms.FileField or forms.ImageField as only the last uploaded file was validated. Unfortunately, Uploading multiple files topic suggested otherwise.
Release notes Django 4.2.1 release notes
Uploading multiple files using one form field has never been supported by forms.FileField or forms.ImageField as only the last uploaded file was validated. Unfortunately, Uploading multiple files topic suggested otherwise.
Release notes Django 1.7 release notes
Previously there were two main patterns for handling errors in forms: Raising a ValidationError from within certain functions (e.g.