djangodocs.org

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

Generic Views

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

DeleteView now uses FormMixin, allowing you to provide a Form subclass, with a checkbox for example, to confirm deletion. In addition, this allows DeleteView to function with django.contrib.messages.views.SuccessMessageMixin.

DeleteView changes

Release notes Django 4.0 release notes Backwards incompatible changes in 4.0

DeleteView now uses FormMixin to handle POST requests. As a consequence, any custom deletion logic in delete() handlers should be moved to form_valid(), or a shared helper method, if required.

Forms

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

The default template used to render forms when cast to a string, e.g. in templates as {{ form }}, is now configurable at the project-level by setting form_template_name on the class provided for FORM_RENDERER.

Log out via GET

Release notes Django 4.1 release notes Features deprecated in 4.1

Use POST requests instead. If you want to retain the user experience of an HTML link, you can use a form that is styled to appear as a link:

django.contrib.auth

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

UserCreationForm now saves many-to-many form fields for a custom user model. The new BaseUserCreationForm is now the recommended base class for customizing the user creation form.

Forms

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

In order to improve accessibility, the following changes are made: Form fields now include the aria-describedby HTML attribute to enable screen readers to associate form fields with their help text. Invalid form fields now include the aria-invalid="true" HTML attribute.

5.0 5.1 5.2 6.0 dev

Forms

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

In order to improve accessibility and enable screen readers to associate fieldsets with their help text, the form fieldset now includes the aria-describedby HTML attribute.

5.1 5.2 6.0 dev

django.contrib.admin

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

The new AdminSite.password_change_form attribute allows customizing the form used in the admin site password change view. Message levels messages.DEBUG and messages.INFO now have distinct icons and CSS styling. Previously, both levels shared the same appearance as messages.SUCCESS.

6.0 dev

Forms

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

The new asset object Stylesheet is available for adding custom HTML-attributes to stylesheet links in form media. See paths as objects for more details.

dev

The Admin

Release notes Porting your apps from Django 0.96 to 1.0 Common changes

The Django administrative interface (django.contrib.admin) has been completely refactored; admin definitions are now completely decoupled from model definitions, the framework has been rewritten to use Django’s new form-handling library and redesigned with extensibility and customization in mind.

Other improvements

Release notes Django 1.1 release notes What’s new in Django 1.1

Instances of Django forms (see the forms overview) now have two additional methods, hidden_fields() and visible_fields(), which return the list of hidden – i.e., <input type="hidden"> – and visible fields on the form, respectively.

One new feature

Release notes Django 1.1.2 release notes

Django 1.2 (the next major release of Django) will contain a feature that will improve protection against Cross-Site Request Forgery (CSRF) attacks. This feature requires the use of a new csrf_token template tag in all forms that Django renders.

django.contrib.admin

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

The success message that appears after adding or editing an object now contains a link to the object’s change form. All inline JavaScript is removed so you can enable the Content-Security-Policy HTTP header if you wish.

CSRF

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

To protect against BREACH attacks, the CSRF protection mechanism now changes the form token value on every request (while keeping an invariant secret which can be used to validate the different tokens).