Adds fetch modes for model fields, database-level on_delete, named email backends through MAILERS, and wider Content Security Policy nonce support.
Download Django 6.1 PDF Official release notes
Release notes
- Released: August 5, 2026
- Python: 3.12 – 3.15
- Support: Standard release
Read the full notes, including backwards-incompatible changes, at docs.djangoproject.com.
New features
- QuerySet.fetch_mode(): FETCH_PEERS collapses many N+1 patterns into two queries, and FETCH_RAISE blocks accidental queries.
- Database-level on_delete options (DB_CASCADE, DB_SET_NULL, DB_SET_DEFAULT) use SQL ON DELETE.
- MAILERS setting: several named email backends, selected with using=.
- csp_nonce_attr template tag, plus CSP nonces in admin and built-in templates.
- Admin actions can target the change form page via action(location=...).
- UUID4 and UUID7 database functions, plus JSONNull for an explicit JSON null.
- RedirectView.preserve_request keeps the method and body (307/308).
Deprecated features
- EMAIL_BACKEND, EMAIL_HOST and the other EMAIL_* settings: use MAILERS.
- mail.get_connection() and the connection / fail_silently / auth_* arguments of mail functions.
- select_related() with no arguments: name the fields or use FETCH_PEERS.
- values_list(flat=True) without a field name.
- The USE_BLANK_CHOICE_DASH and SIGNED_COOKIE_LEGACY_SALT_FALLBACK transitional settings.