djangodocs.org

1305 sections across all versions Narrow to Django 6.0 (current) →

email_re

Release notes Django 1.2 release notes

An undocumented regular expression for validating email addresses has been moved from django.form.fields to django.core.validators. You will need to update your imports if you are using it.

dev

email_re

Release notes Django 1.2 release notes Backwards-incompatible changes in 1.2

An undocumented regular expression for validating email addresses has been moved from django.form.fields to django.core.validators. You will need to update your imports if you are using it.

4.2 5.0 5.1 5.2 6.0

Built-in validators

Reference Validators

The django.core.validators module contains a collection of callable validators for use with model and form fields. They’re used internally but are available for use with your own fields, too.

dev

Built-in validators

Reference Validators

The django.core.validators module contains a collection of callable validators for use with model and form fields. They’re used internally but are available for use with your own fields, too.

4.2 5.0 5.1 5.2 6.0

ImageField

Reference Form fields Built-in Field classes

- Validates that file data has been bound to the form. Also uses FileExtensionValidator to validate that the file extension is supported by Pillow. - Error message keys: required, invalid, missing, empty, invalid_image

4.2 5.0 5.1 5.2 6.0

ImageField

Reference Form fields

- Validates that file data has been bound to the form. Also uses FileExtensionValidator to validate that the file extension is supported by Pillow. - Error message keys: required, invalid, missing, empty, invalid_image

dev

URLField

Reference Model field reference

classURLField(max_length=200,**options)[source] A CharField for a URL, validated by URLValidator. The default form widget for this field is a URLInput. Like all CharField subclasses, URLField takes the optional max_length argument. If you don’t specify max_length, a default of 200 is used.

dev

URLField

Reference Model field reference Field types

classURLField(max_length=200,**options)[source] A CharField for a URL, validated by URLValidator. The default form widget for this field is a URLInput. Like all CharField subclasses, URLField takes the optional max_length argument. If you don’t specify max_length, a default of 200 is used.

4.2 5.0 5.1 5.2 6.0

IntegerField

Reference Model field reference Field types

It uses MinValueValidator and MaxValueValidator to validate the input based on the values that the default database supports. The default form widget for this field is a NumberInput when localize is False or TextInput otherwise.

4.2 5.0 5.1 5.2 6.0

IntegerField

Reference Model field reference

It uses MinValueValidator and MaxValueValidator to validate the input based on the values that the default database supports. The default form widget for this field is a NumberInput when localize is False or TextInput otherwise.

dev

DecimalField

Reference Model field reference Field types

… you’d use: And to store numbers up to approximately one billion with a resolution of 10 decimal places: The default form widget for this field is a NumberInput when localize is False or TextInput otherwise. NOTE: For more information about …

4.2 5.0 5.1 5.2 6.0

DecimalField

Reference Model field reference

… you’d use: And to store numbers up to approximately one billion with a resolution of 10 decimal places: The default form widget for this field is a NumberInput when localize is False or TextInput otherwise. NOTE: For more information about …

dev

A

Index

… (RelatedManager method) - add_action() (AdminSite method) - add_arguments() (BaseCommand method) - (DiscoverRunner class method) - add_constraint() (BaseDatabaseSchemaEditor method) - add_error() (Form method) - add_field() (BaseDatabaseSchemaEditor method) - add_form_template (ModelAdmin attribute) - add_index() (BaseDatabaseSchemaEditor method) - add_item() (SyndicationFeed method) - add_item_elements() …

I

Index

… - template tag - ifchanged - template tag - IGNORABLE_404_URLS - setting - ImageField (class in django.db.models) - (class in django.forms) - ImageFile (class in django.core.files.images) - ImmediateBackend (class in django.tasks.backends.immediate) - import_epsg() (SpatialReference method) - import_proj() (SpatialReference method) - …

Making requests

Topic guide Testing tools The test client

Serialization is performed with [`DjangoJSONEncoder`](../serialization.md#django.core.serializers.json.DjangoJSONEncoder) by default, and can be overridden by providing a `json_encoder` argument to [`Client`](#django.test.Client). This serialization also happens for [`put()`](#django.test.Client.put), [`patch()`](#django.test.Client.patch), and [`delete()`](#django.test.Client.delete) requests. If you provide any other `content_type` (e.g.

4.2 5.0 5.1 5.2 6.0

E

Index

… (models.User method) - EmailAlternative (class in django.core.mail) - EmailAttachment (class in django.core.mail) - EmailField (class in django.db.models) - (class in django.forms) - EmailInput (class in django.forms) - EmailMessage (class in django.core.mail) - EmailMultiAlternatives (class in django.core.mail) - EmailValidator (class in …

R

Index

… | | --- | --- | | - Radians (class in django.db.models.functions) - radio_fields (ModelAdmin attribute) - RadioSelect (class in django.forms) - raise_exception (AccessMixin attribute) - random - template filter - Random (class in django.db.models.functions) - RandomUUID (class in django.contrib.postgres.functions) …

S

Index

… (File method) - (LayerMapping method) - (Model method) - (Storage method) - save_as (ModelAdmin attribute) - save_as_continue (ModelAdmin attribute) - save_formset() (ModelAdmin method) - save_model() (ModelAdmin method) - save_on_top (ModelAdmin attribute) - save_related() (ModelAdmin method) - savepoint() (in module django.db.transaction) …

F

Index

… fid (Feature attribute) - field - (BoundField attribute) - Field (class in django.contrib.gis.gdal) - (class in django.db.models) - (class in django.forms) - field (ModelChoiceIterator attribute) - field lookup type - arrayfield.contained_by - arrayfield.contains - arrayfield.index - arrayfield.len - arrayfield.overlap - …

EmailField

Reference Form fields

classEmailField(**kwargs)[source] : - Default widget: EmailInput - Empty value: Whatever you’ve given as empty_value. - Normalizes to: A string. - Uses EmailValidator to validate that the given value is a valid email address, using a moderately complex regular expression.

dev