djangodocs.org

694 sections in Django 5.2 Search all versions →

Release notes Django 1.2.5 release notes Backwards incompatible changes

Django includes a CSRF-protection mechanism, which makes use of a token inserted into outgoing forms. Middleware then checks for the token’s presence on form submission, and validates it.

Forms

Release notes Django 1.7 release notes What’s new in Django 1.7Minor features

The required attribute for each individual field will be respected, and a new incomplete validation error will be raised when any required fields are empty. The clean() method on a form no longer needs to return self.cleaned_data.

Miscellaneous

Release notes Django 1.9 release notes Features deprecated in 1.9

The UTC offset is stored on a data attribute of the <body> tag. CommaSeparatedIntegerField validation has been refined to forbid values like ',', ',1', and '1,,2'. Form initialization was moved from the ProcessFormView.get() method to the new FormMixin.get_context_data() method.

FormSet updates

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

In Django 1.3 FormSet creation behavior is modified slightly. Historically the class didn’t make a distinction between not being passed data and being passed empty dictionary. This was inconsistent with behavior in other parts of the framework.

Release notes Django 1.7 release notes Backwards incompatible changes in 1.7

… an unauthorized or unauthenticated user directly to the login view, without HTTP redirection. In Django 1.7, this behavior changed to conform to a more traditional workflow where any unauthorized request to an admin page will be redirected (by HTTP status …

Bugfixes

Release notes Django 1.11.2 release notes

Relaxed the validation added in Django 1.11 of the fields in the defaults argument of QuerySet.get_or_create() and update_or_create() to reallow settable model properties (#28222). Fixed MultipleObjectMixin.paginate_queryset() crash on Python 2 if the InvalidPage message contains non-ASCII (#28204).

Release notes Django 1.4 release notes Backwards incompatible changes in 1.4

… contrib.auth password reset hash Consequences: Password reset links from before the upgrade will not work. Time period: Defined by PASSWORD_RESET_TIMEOUT_DAYS. Form-related hashes: these have a much shorter lifetime and are relevant only for the short window where a user might …

Miscellaneous

Release notes Django 2.0 release notes Features deprecated in 2.0

Django favors callable references since they provide better performance and debugging experience. RedirectView no longer silences NoReverseMatch if the pattern_name doesn’t exist. When USE_L10N is off, FloatField and DecimalField now respect DECIMAL_SEPARATOR and THOUSAND_SEPARATOR during validation.

Miscellaneous

Release notes Django 4.1 release notes Features deprecated in 4.1

The type="text/css" attribute is no longer included in <link> tags for CSS form media. formset:added and formset:removed JavaScript events are now pure JavaScript events and don’t depend on jQuery. See Inline form events for more details on the change.

Miscellaneous

Release notes Django 1.10 release notes Features deprecated in 1.10

This may affect query counts tested by TransactionTestCase.assertNumQueries(). Support for skip_validation in BaseCommand.execute(**options) is removed. Use skip_checks (added in Django 1.7) instead. loaddata now raises a CommandError instead of showing a warning when the specified fixture file is not found.

Bugfixes

Release notes Django 1.11.1 release notes

Fixed a regression in formset min_num validation with unchanged forms that have initial data (#28130). Prepared for cx_Oracle 6.0 support (#28138). Updated the contrib.postgres SplitArrayWidget to use template-based widget rendering (#28040). Fixed crash in BaseGeometryWidget.get_context() when overriding existing attrs (#28105).

Miscellaneous

Release notes Django 1.7 release notes Backwards incompatible changes in 1.7

The default ordering of Form fields in case of inheritance has changed to follow normal Python MRO. Fields are now discovered by iterating through the MRO in reverse with the topmost class coming last.

Bugfixes

Release notes Django 1.7.2 release notes

Allowed usage of DateTimeField() as Transform.output_field (#23420). Fixed a migration serializing bug involving float("nan") and float("inf") (#23770). Fixed a regression where custom form fields having a queryset attribute but no limit_choices_to could not be used in a ModelForm (#23795).

Features removed in 1.9

Release notes Django 1.9 release notes

The model and form IPAddressField is removed. A stub field remains for compatibility with historical migrations. AppCommand.handle_app() is no longer supported. RequestSite and get_current_site() are no longer importable from django.contrib.sites.models. FastCGI support via the runfcgi management command is removed.

Bugfixes

Release notes Django 1.8.5 release notes

This may fix a performance regression on some databases. Fixed custom queryset chaining with values() and values_list() (#20625). Moved the unsaved model instance assignment data loss check on reverse relations to Model.save() (#25160).

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.

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.

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

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.

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.