diff --git a/django/__init__.py b/django/__init__.py index 4402600c576f..b96aa2e1610d 100644 --- a/django/__init__.py +++ b/django/__init__.py @@ -1,6 +1,6 @@ from django.utils.version import get_version -VERSION = (6, 1, 0, "alpha", 0) +VERSION = (6, 2, 0, "alpha", 0) __version__ = get_version(VERSION) diff --git a/django/contrib/auth/hashers.py b/django/contrib/auth/hashers.py index 814185e51aa1..7e9b7c090a51 100644 --- a/django/contrib/auth/hashers.py +++ b/django/contrib/auth/hashers.py @@ -324,7 +324,7 @@ class PBKDF2PasswordHasher(BasePasswordHasher): """ algorithm = "pbkdf2_sha256" - iterations = 1_500_000 + iterations = 1_800_000 digest = hashlib.sha256 def encode(self, password, salt, iterations=None): diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py index f85658245483..2832b98b59d5 100644 --- a/django/utils/deprecation.py +++ b/django/utils/deprecation.py @@ -19,15 +19,16 @@ def django_file_prefixes(): return (os.path.join(os.path.dirname(file), ""),) -class RemovedInNextVersionWarning(DeprecationWarning): +class RemovedInDjango70Warning(DeprecationWarning): pass -class RemovedInDjango70Warning(PendingDeprecationWarning): +class RemovedInDjango71Warning(PendingDeprecationWarning): pass -RemovedAfterNextVersionWarning = RemovedInDjango70Warning +RemovedInNextVersionWarning = RemovedInDjango70Warning +RemovedAfterNextVersionWarning = RemovedInDjango71Warning def warn_about_external_use( diff --git a/docs/conf.py b/docs/conf.py index 1529421aa183..0c18e4fcae99 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -120,7 +120,7 @@ # built documents. # # The short X.Y version. -version = "6.1" +version = "6.2" # The full version, including alpha/beta/rc tags. try: from django import VERSION, get_version @@ -137,7 +137,7 @@ def django_release(): release = django_release() # The "development version" of Django -django_next_version = "6.1" +django_next_version = "6.2" extlinks = { "bpo": ("https://bugs.python.org/issue?@action=redirect&bpo=%s", "bpo-%s"), diff --git a/docs/faq/install.txt b/docs/faq/install.txt index 23fb6dcd9089..1e98b2c4d647 100644 --- a/docs/faq/install.txt +++ b/docs/faq/install.txt @@ -50,12 +50,10 @@ What Python version can I use with Django? ============== =============== Django version Python versions ============== =============== -4.2 3.8, 3.9, 3.10, 3.11, 3.12 (added in 4.2.8) -5.0 3.10, 3.11, 3.12 -5.1 3.10, 3.11, 3.12, 3.13 (added in 5.1.3) 5.2 3.10, 3.11, 3.12, 3.13, 3.14 (added in 5.2.8) 6.0 3.12, 3.13, 3.14 6.1 3.12, 3.13, 3.14 +6.2 3.12, 3.13, 3.14 ============== =============== For each version of Python, only the latest micro release (A.B.C) is officially diff --git a/docs/howto/custom-shell.txt b/docs/howto/custom-shell.txt index 28a75e06f675..894ff6d8d0cb 100644 --- a/docs/howto/custom-shell.txt +++ b/docs/howto/custom-shell.txt @@ -56,11 +56,6 @@ Running this customized ``shell`` command with ``verbosity=2`` would show: from django.urls import resolve, reverse from django.utils import timezone -.. versionchanged:: 6.0 - - Automatic imports of common utilities, such as ``django.conf.settings``, - were added. - If an overridden ``shell`` command includes paths that cannot be imported, these errors are shown when ``verbosity`` is set to ``1`` or higher. Duplicate imports are automatically handled. diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 2cb6a15f2fd5..5a2aa5d5b837 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -7,6 +7,14 @@ in a backward incompatible way, following their deprecation, as per the :ref:`deprecation policy `. More details about each item can often be found in the release notes of two versions prior. +.. _deprecation-removed-in-7.1: + +7.1 +--- + +See the :ref:`Django 6.2 release notes ` for more +details on these changes. + .. _deprecation-removed-in-7.0: 7.0 diff --git a/docs/man/django-admin.1 b/docs/man/django-admin.1 index b8c61b1078d7..c99900423f61 100644 --- a/docs/man/django-admin.1 +++ b/docs/man/django-admin.1 @@ -1,4 +1,5 @@ -.\" Man page generated from reStructuredText. +.\" Man page generated from reStructuredText +.\" by the Docutils 0.22.4 manpage writer. . . .nr rst2man-indent-level 0 @@ -27,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DJANGO-ADMIN" "1" "September 17, 2025" "6.0" "Django" +.TH "DJANGO-ADMIN" "1" "May 20, 2026" "6.1" "Django" .SH NAME django-admin \- Utility script for the Django web framework .sp @@ -36,7 +37,7 @@ This document outlines all it can do. .sp In addition, \fBmanage.py\fP is automatically created in each Django project. It does the same thing as \fBdjango\-admin\fP but also sets the -\fI\%DJANGO_SETTINGS_MODULE\fP environment variable so that it points to your +\fBDJANGO_SETTINGS_MODULE\fP \%<#\:envvar-DJANGO_SETTINGS_MODULE> environment variable so that it points to your project\(aqs \fBsettings.py\fP file. .sp The \fBdjango\-admin\fP script should be on your system path if you installed @@ -46,7 +47,7 @@ environment activated. Generally, when working on a single Django project, it\(aqs easier to use \fBmanage.py\fP than \fBdjango\-admin\fP\&. If you need to switch between multiple Django settings files, use \fBdjango\-admin\fP with -\fI\%DJANGO_SETTINGS_MODULE\fP or the \fI\%\-\-settings\fP command line +\fBDJANGO_SETTINGS_MODULE\fP \%<#\:envvar-DJANGO_SETTINGS_MODULE> or the \fB\-\-settings\fP command line option. .sp The command\-line examples throughout this document use \fBdjango\-admin\fP to @@ -84,7 +85,7 @@ command and a list of its available options. .SS App names .sp Many commands take a list of \(dqapp names.\(dq An \(dqapp name\(dq is the basename of the -package containing your models. For example, if your \fI\%INSTALLED_APPS\fP +package containing your models. For example, if your \fBINSTALLED_APPS\fP \%<#\:std-setting-INSTALLED_APPS> contains the string \fB\(aqmysite.blog\(aq\fP, the app name is \fBblog\fP\&. .SS Determining the version .INDENT 0.0 @@ -94,7 +95,7 @@ contains the string \fB\(aqmysite.blog\(aq\fP, the app name is \fBblog\fP\&. .sp Run \fBdjango\-admin version\fP to display the current Django version. .sp -The output follows the schema described in \X'tty: link https://peps.python.org/pep-0440/'\fI\%PEP 440\fP\X'tty: link': +The output follows the schema described in \fBPEP 440\fP \%: .INDENT 0.0 .INDENT 3.5 .sp @@ -107,7 +108,7 @@ The output follows the schema described in \X'tty: link https://peps.python.org/ .UNINDENT .SS Displaying debug output .sp -Use \fI\%\-\-verbosity\fP, where it is supported, to specify the amount of +Use \fB\-\-verbosity\fP, where it is supported, to specify the amount of notification and debug information that \fBdjango\-admin\fP prints to the console. .SH AVAILABLE COMMANDS .SS \fBcheck\fP @@ -116,7 +117,7 @@ notification and debug information that \fBdjango\-admin\fP prints to the consol .B django\-admin check [app_label [app_label ...]] .UNINDENT .sp -Uses the \fI\%system check framework\fP to inspect the entire +Uses the system check framework \%<> to inspect the entire Django project for common problems. .sp By default, all apps will be checked. You can check a subset of apps by @@ -135,7 +136,7 @@ django\-admin check auth admin myapp .UNINDENT .sp The system check framework performs many different types of checks that are -\fI\%categorized with tags\fP\&. You can use these +categorized with tags \%<#\:system-check-builtin-tags>\&. You can use these tags to restrict the checks performed to just those in a particular category. For example, to perform only models and compatibility checks, run: .INDENT 0.0 @@ -179,7 +180,7 @@ setting. You can use this option in your local development environment, but since your local development settings module may not have many of your production settings, you will probably want to point the \fBcheck\fP command at a different -settings module, either by setting the \fI\%DJANGO_SETTINGS_MODULE\fP +settings module, either by setting the \fBDJANGO_SETTINGS_MODULE\fP \%<#\:envvar-DJANGO_SETTINGS_MODULE> environment variable, or by passing the \fB\-\-settings\fP option: .INDENT 0.0 .INDENT 3.5 @@ -206,8 +207,8 @@ status. Default is \fBERROR\fP\&. .B django\-admin compilemessages .UNINDENT .sp -Compiles \fB\&.po\fP files created by \fI\%makemessages\fP to \fB\&.mo\fP files for -use with the built\-in gettext support. See \fI\%Internationalization and localization\fP\&. +Compiles \fB\&.po\fP files created by \fBmakemessages\fP to \fB\&.mo\fP files for +use with the built\-in gettext support. See Internationalization and localization \%<>\&. .INDENT 0.0 .TP .B \-\-locale LOCALE, \-l LOCALE @@ -226,7 +227,7 @@ are excluded. .B \-\-use\-fuzzy, \-f .UNINDENT .sp -Includes \X'tty: link https://www.gnu.org/software/gettext/manual/html_node/Fuzzy-Entries.html'\fI\%fuzzy translations\fP\X'tty: link' into compiled files. +Includes fuzzy translations \% into compiled files. .sp Example usage: .INDENT 0.0 @@ -249,7 +250,7 @@ django\-admin compilemessages \-x pt_BR \-x fr .B \-\-ignore PATTERN, \-i PATTERN .UNINDENT .sp -Ignores directories matching the given \X'tty: link https://docs.python.org/3/library/glob.html#module-glob'\fI\%glob\fP\X'tty: link'\-style pattern. Use +Ignores directories matching the given \fBglob\fP \%\-style pattern. Use multiple times to ignore more. .sp Example usage: @@ -268,7 +269,7 @@ django\-admin compilemessages \-\-ignore=cache \-\-ignore=outdated/*/locale .UNINDENT .sp Creates the cache tables for use with the database cache backend using the -information from your settings file. See \fI\%Django\(aqs cache framework\fP for more +information from your settings file. See Django\(aqs cache framework \%<> for more information. .INDENT 0.0 .TP @@ -291,8 +292,8 @@ customize it or use the migrations framework. .UNINDENT .sp Runs the command\-line client for the database engine specified in your -\fI\%ENGINE\fP setting, with the connection parameters -specified in your \fI\%USER\fP, \fI\%PASSWORD\fP, etc., settings. +\fBENGINE\fP \%<#\:std-setting-DATABASE-ENGINE> setting, with the connection parameters +specified in your \fBUSER\fP \%<#\:std-setting-USER>, \fBPASSWORD\fP \%<#\:std-setting-PASSWORD>, etc., settings. .INDENT 0.0 .IP \(bu 2 For PostgreSQL, this runs the \fBpsql\fP command\-line client. @@ -350,11 +351,11 @@ $ django\-admin dbshell \-\- \-e \(dqselect user()\(dq .UNINDENT .UNINDENT .sp -\fBNOTE:\fP +\fBNote:\fP .INDENT 0.0 .INDENT 3.5 -Be aware that not all options set in the \fI\%OPTIONS\fP part of your -database configuration in \fI\%DATABASES\fP are passed to the +Be aware that not all options set in the \fBOPTIONS\fP \%<#\:std-setting-OPTIONS> part of your +database configuration in \fBDATABASES\fP \%<#\:std-setting-DATABASES> are passed to the command\-line client, e.g. \fB\(aqisolation_level\(aq\fP\&. .UNINDENT .UNINDENT @@ -365,11 +366,11 @@ command\-line client, e.g. \fB\(aqisolation_level\(aq\fP\&. .UNINDENT .sp Displays differences between the current settings file and Django\(aqs default -settings (or another settings file specified by \fI\%\-\-default\fP). +settings (or another settings file specified by \fB\-\-default\fP). .sp Settings that don\(aqt appear in the defaults are followed by \fB\(dq###\(dq\fP\&. For -example, the default settings don\(aqt define \fI\%ROOT_URLCONF\fP, so -\fI\%ROOT_URLCONF\fP is followed by \fB\(dq###\(dq\fP in the output of +example, the default settings don\(aqt define \fBROOT_URLCONF\fP \%<#\:std-setting-ROOT_URLCONF>, so +\fBROOT_URLCONF\fP \%<#\:std-setting-ROOT_URLCONF> is followed by \fB\(dq###\(dq\fP in the output of \fBdiffsettings\fP\&. .INDENT 0.0 .TP @@ -406,15 +407,15 @@ application(s). .sp If no application name is provided, all installed applications will be dumped. .sp -The output of \fBdumpdata\fP can be used as input for \fI\%loaddata\fP\&. +The output of \fBdumpdata\fP can be used as input for \fBloaddata\fP\&. .sp When result of \fBdumpdata\fP is saved as a file, it can serve as a -\fI\%fixture\fP for -\fI\%tests\fP or as an -\fI\%initial data\fP\&. +fixture \%<#\:fixtures-explanation> for +tests \%<#\:topics-testing-fixtures> or as an +initial data \%<#\:initial-data-via-fixtures>\&. .sp Note that \fBdumpdata\fP uses the default manager on the model for selecting the -records to dump. If you\(aqre using a \fI\%custom manager\fP as +records to dump. If you\(aqre using a custom manager \%<#\:custom-managers> as the default manager and it filters some of the available records, not all of the objects will be dumped. .INDENT 0.0 @@ -430,7 +431,7 @@ or modified by a custom manager. .UNINDENT .sp Specifies the serialization format of the output. Defaults to JSON. Supported -formats are listed in \fI\%Serialization formats\fP\&. +formats are listed in Serialization formats \%<#\:serialization-formats>\&. .INDENT 0.0 .TP .B \-\-indent INDENT @@ -473,7 +474,7 @@ Uses the \fBnatural_key()\fP model method to serialize any foreign key and many\-to\-many relationship to objects of the type that defines the method. If you\(aqre dumping \fBcontrib.auth\fP \fBPermission\fP objects or \fBcontrib.contenttypes\fP \fBContentType\fP objects, you should probably use this -flag. See the \fI\%natural keys\fP +flag. See the natural keys \%<#\:topics-serialization-natural-keys> documentation for more details on this and the next option. .INDENT 0.0 .TP @@ -523,7 +524,7 @@ Removes all data from the database and re\-executes any post\-synchronization handlers. The table of which migrations have been applied is not cleared. .sp If you would rather start from an empty database and rerun all migrations, you -should drop and recreate the database and then run \fI\%migrate\fP instead. +should drop and recreate the database and then run \fBmigrate\fP instead. .INDENT 0.0 .TP .B \-\-noinput, \-\-no\-input @@ -543,13 +544,13 @@ Specifies the database to flush. Defaults to \fBdefault\fP\&. .UNINDENT .sp Introspects the database tables in the database pointed\-to by the -\fI\%NAME\fP setting and outputs a Django model module (a \fBmodels.py\fP +\fBNAME\fP \%<#\:std-setting-NAME> setting and outputs a Django model module (a \fBmodels.py\fP file) to standard output. .sp You may choose what tables or views to inspect by passing their names as arguments. If no arguments are provided, models are created for views only if -the \fI\%\-\-include\-views\fP option is used. Models for partition tables are -created on PostgreSQL if the \fI\%\-\-include\-partitions\fP option is used. +the \fB\-\-include\-views\fP option is used. Models for partition tables are +created on PostgreSQL if the \fB\-\-include\-partitions\fP option is used. .sp Use this if you have a legacy database with which you\(aqd like to use Django. The script will inspect the database and create a model for each table within @@ -564,7 +565,7 @@ If \fBinspectdb\fP cannot map a column\(aqs type to a model field type, it\(aqll use \fBTextField\fP and will insert the Python comment \fB\(aqThis field type is a guess.\(aq\fP next to the field in the generated model. The recognized fields may depend on apps listed in -\fI\%INSTALLED_APPS\fP\&. For example, \fI\%django.contrib.postgres\fP adds +\fBINSTALLED_APPS\fP \%<#\:std-setting-INSTALLED_APPS>\&. For example, \fBdjango.contrib.postgres\fP \%<#\:module-django\:.contrib\:.postgres> adds recognition for several PostgreSQL\-specific field types. .IP \(bu 2 If the database column name is a Python reserved word (such as @@ -583,7 +584,7 @@ customizations. In particular, you\(aqll need to rearrange models\(aq order, so models that refer to other models are ordered properly. .sp Django doesn\(aqt create database defaults when a -\fI\%default\fP is specified on a model field. +\fBdefault\fP \%<#\:django\:.db\:.models\:.Field\:.default> is specified on a model field. Similarly, database defaults aren\(aqt translated to model field defaults or detected in any fashion by \fBinspectdb\fP\&. .sp @@ -591,13 +592,13 @@ By default, \fBinspectdb\fP creates unmanaged models. That is, \fBmanaged = False\fP in the model\(aqs \fBMeta\fP class tells Django not to manage each table\(aqs creation, modification, and deletion. If you do want to allow Django to manage the table\(aqs lifecycle, you\(aqll need to change the -\fI\%managed\fP option to \fBTrue\fP (or remove it +\fBmanaged\fP \%<#\:django\:.db\:.models\:.Options\:.managed> option to \fBTrue\fP (or remove it because \fBTrue\fP is its default value). .SS Database\-specific notes .SS Oracle .INDENT 0.0 .IP \(bu 2 -Models are created for materialized views if \fI\%\-\-include\-views\fP is +Models are created for materialized views if \fB\-\-include\-views\fP is used. .UNINDENT .SS PostgreSQL @@ -606,10 +607,10 @@ used. Models are created for foreign tables. .IP \(bu 2 Models are created for materialized views if -\fI\%\-\-include\-views\fP is used. +\fB\-\-include\-views\fP is used. .IP \(bu 2 Models are created for partition tables if -\fI\%\-\-include\-partitions\fP is used. +\fB\-\-include\-partitions\fP is used. .UNINDENT .INDENT 0.0 .TP @@ -638,7 +639,7 @@ If this option is provided, models are also created for database views. .UNINDENT .sp Searches for and loads the contents of the named -\fI\%fixture\fP into the database. +fixture \%<#\:fixtures-explanation> into the database. .INDENT 0.0 .TP .B \-\-database DATABASE @@ -664,8 +665,8 @@ Specifies a single app to look for fixtures in rather than looking in all apps. .B \-\-format FORMAT .UNINDENT .sp -Specifies the \fI\%serialization format\fP (e.g., -\fBjson\fP or \fBxml\fP) for fixtures \fI\%read from stdin\fP\&. +Specifies the serialization format \%<#\:serialization-formats> (e.g., +\fBjson\fP or \fBxml\fP) for fixtures read from stdin\&. .INDENT 0.0 .TP .B \-\-exclude EXCLUDE, \-e EXCLUDE @@ -687,8 +688,8 @@ django\-admin loaddata \-\-format=json \- .UNINDENT .UNINDENT .sp -When reading from \fBstdin\fP, the \fI\%\-\-format\fP option -is required to specify the \fI\%serialization format\fP +When reading from \fBstdin\fP, the \fB\-\-format\fP option +is required to specify the serialization format \%<#\:serialization-formats> of the input (e.g., \fBjson\fP or \fBxml\fP). .sp Loading from \fBstdin\fP is useful with standard input and output redirections. @@ -702,12 +703,12 @@ django\-admin dumpdata \-\-format=json \-\-database=test app_label.ModelName | d .UNINDENT .UNINDENT .sp -The \fI\%dumpdata\fP command can be used to generate input for \fBloaddata\fP\&. +The \fBdumpdata\fP command can be used to generate input for \fBloaddata\fP\&. .sp -\fBSEE ALSO:\fP +\fBSee also:\fP .INDENT 0.0 .INDENT 3.5 -For more detail about fixtures see the \fI\%Fixtures\fP topic. +For more detail about fixtures see the Fixtures \%<#\:fixtures-explanation> topic. .UNINDENT .UNINDENT .SS \fBmakemessages\fP @@ -720,12 +721,12 @@ Runs over the entire source tree of the current directory and pulls out all strings marked for translation. It creates (or updates) a message file in the conf/locale (in the Django tree) or locale (for project and application) directory. After making changes to the messages files you need to compile them -with \fI\%compilemessages\fP for use with the builtin gettext support. See -the \fI\%i18n documentation\fP for details. +with \fBcompilemessages\fP for use with the builtin gettext support. See +the i18n documentation \%<#\:how-to-create-language-files> for details. .sp This command doesn\(aqt require configured settings. However, when settings aren\(aqt -configured, the command can\(aqt ignore the \fI\%MEDIA_ROOT\fP and -\fI\%STATIC_ROOT\fP directories or include \fI\%LOCALE_PATHS\fP\&. +configured, the command can\(aqt ignore the \fBMEDIA_ROOT\fP \%<#\:std-setting-MEDIA_ROOT> and +\fBSTATIC_ROOT\fP \%<#\:std-setting-STATIC_ROOT> directories or include \fBLOCALE_PATHS\fP \%<#\:std-setting-LOCALE_PATHS>\&. .INDENT 0.0 .TP .B \-\-all, \-a @@ -738,7 +739,7 @@ Updates the message files for all available languages. .UNINDENT .sp Specifies a list of file extensions to examine (default: \fBhtml\fP, \fBtxt\fP, -\fBpy\fP or \fBjs\fP if \fI\%\-\-domain\fP is \fBdjangojs\fP). +\fBpy\fP or \fBjs\fP if \fB\-\-domain\fP is \fBdjangojs\fP). .sp Example usage: .INDENT 0.0 @@ -823,7 +824,7 @@ django\-admin makemessages \-\-locale=de \-\-symlinks .B \-\-ignore PATTERN, \-i PATTERN .UNINDENT .sp -Ignores files or directories matching the given \X'tty: link https://docs.python.org/3/library/glob.html#module-glob'\fI\%glob\fP\X'tty: link'\-style pattern. Use +Ignores files or directories matching the given \fBglob\fP \%\-style pattern. Use multiple times to ignore more. .sp These patterns are used by default: \fB\(aqCVS\(aq\fP, \fB\(aq.*\(aq\fP, \fB\(aq*~\(aq\fP, \fB\(aq*.pyc\(aq\fP\&. @@ -871,7 +872,7 @@ line number. .IP \(bu 2 \fBfile\fP: the line number is omitted. .IP \(bu 2 -\fBnever\fP: the lines are suppressed (same as \fI\%\-\-no\-location\fP). +\fBnever\fP: the lines are suppressed (same as \fB\-\-no\-location\fP). .UNINDENT .sp Requires \fBgettext\fP 0.19 or newer. @@ -890,11 +891,11 @@ Prevents deleting the temporary \fB\&.pot\fP files generated before creating the \fB\&.po\fP file. This is useful for debugging errors which may prevent the final language files from being created. .sp -\fBSEE ALSO:\fP +\fBSee also:\fP .INDENT 0.0 .INDENT 3.5 -See \fI\%Customizing the makemessages command\fP for instructions on how to customize -the keywords that \fI\%makemessages\fP passes to \fBxgettext\fP\&. +See Customizing the makemessages command \%<#\:customizing-makemessages> for instructions on how to customize +the keywords that \fBmakemessages\fP passes to \fBxgettext\fP\&. .UNINDENT .UNINDENT .SS \fBmakemigrations\fP @@ -905,7 +906,7 @@ the keywords that \fI\%makemessages\fP passes to \fBxgettext\fP\&. .sp Creates new migrations based on the changes detected to your models. Migrations, their relationship with apps and more are covered in depth in -\fI\%the migrations documentation\fP\&. +the migrations documentation \%<>\&. .sp Providing one or more app names as arguments will limit the migrations created to the app(s) specified and any dependencies needed (the table at the other end @@ -949,7 +950,7 @@ Enables fixing of migration conflicts. .UNINDENT .sp Allows naming the generated migration(s) instead of using a generated name. The -name must be a valid Python \X'tty: link https://docs.python.org/3/reference/lexical_analysis.html#identifiers'\fI\%identifier\fP\X'tty: link'\&. +name must be a valid Python identifier \%\&. .INDENT 0.0 .TP .B \-\-no\-header @@ -988,7 +989,7 @@ previous name, set it using \fB\-\-name\fP\&. .sp Synchronizes the database state with the current set of models and migrations. Migrations, their relationship with apps and more are covered in depth in -\fI\%the migrations documentation\fP\&. +the migrations documentation \%<>\&. .sp The behavior of this command changes depending on the arguments provided: .INDENT 0.0 @@ -1008,7 +1009,7 @@ name \fBzero\fP to migrate all the way back i.e. to revert all applied migrations for an app. .UNINDENT .sp -\fBWARNING:\fP +\fBWarning:\fP .INDENT 0.0 .INDENT 3.5 When unapplying migrations, all dependent migrations will also be @@ -1042,7 +1043,7 @@ run correctly. .sp Allows Django to skip an app\(aqs initial migration if all database tables with the names of all models created by all -\fI\%CreateModel\fP operations in that +\fBCreateModel\fP \%<#\:django\:.db\:.migrations\:.operations\:.CreateModel> operations in that migration already exist. This option is intended for use when first running migrations against a database that preexisted the use of migrations. This option does not, however, check for matching database schema beyond matching @@ -1084,7 +1085,7 @@ detected. .sp Deletes nonexistent migrations from the \fBdjango_migrations\fP table. This is useful when migration files replaced by a squashed migration have been removed. -See \fI\%Squashing migrations\fP for more details. +See Squashing migrations \%<#\:migration-squashing> for more details. .SS \fBoptimizemigration\fP .INDENT 0.0 .TP @@ -1117,9 +1118,9 @@ might not have access to start a port on a low port number. Low port numbers are reserved for the superuser (root). .sp This server uses the WSGI application object specified by the -\fI\%WSGI_APPLICATION\fP setting. +\fBWSGI_APPLICATION\fP \%<#\:std-setting-WSGI_APPLICATION> setting. .sp -\fBWARNING:\fP +\fBWarning:\fP .INDENT 0.0 .INDENT 3.5 DO NOT USE THIS SERVER IN A PRODUCTION SETTING. @@ -1135,8 +1136,8 @@ needed. You don\(aqt need to restart the server for code changes to take effect. However, some actions like adding files don\(aqt trigger a restart, so you\(aqll have to restart the server in these cases. .sp -If you\(aqre using Linux or MacOS and install both \X'tty: link https://pypi.org/project/pywatchman/'\fI\%pywatchman\fP\X'tty: link' and the -\X'tty: link https://facebook.github.io/watchman/'\fI\%Watchman\fP\X'tty: link' service, kernel signals will be used to autoreload the server +If you\(aqre using Linux or MacOS and install both pywatchman \% and the +Watchman \% service, kernel signals will be used to autoreload the server (rather than polling file modification timestamps each second). This offers better performance on large projects, reduced response time after code changes, more robust change detection, and a reduction in power usage. Django supports @@ -1147,7 +1148,7 @@ more robust change detection, and a reduction in power usage. Django supports .sp When using Watchman with a project that includes large non\-Python directories like \fBnode_modules\fP, it\(aqs advisable to ignore this directory -for optimal performance. See the \X'tty: link https://facebook.github.io/watchman/docs/config#ignore_dirs'\fI\%watchman documentation\fP\X'tty: link' for information +for optimal performance. See the watchman documentation \% for information on how to do this. .UNINDENT .UNINDENT @@ -1160,13 +1161,13 @@ on how to do this. .UNINDENT .sp The default timeout of \fBWatchman\fP client is 5 seconds. You can change it -by setting the \fI\%DJANGO_WATCHMAN_TIMEOUT\fP environment variable. +by setting the \fBDJANGO_WATCHMAN_TIMEOUT\fP environment variable. .UNINDENT .UNINDENT .sp When you start the server, and each time you change Python code while the server is running, the system check framework will check your entire Django -project for some common errors (see the \fI\%check\fP command). If any +project for some common errors (see the \fBcheck\fP command). If any errors are found, they will be printed to standard output. You can use the \fB\-\-skip\-checks\fP option to skip running system checks. .sp @@ -1183,12 +1184,12 @@ You can provide an IPv6 address surrounded by brackets .sp A hostname containing ASCII\-only characters can also be used. .sp -If the \fI\%staticfiles\fP contrib app is enabled -(default in new projects) the \fI\%runserver\fP command will be overridden -with its own \fI\%runserver\fP command. +If the staticfiles \%<> contrib app is enabled +(default in new projects) the \fBrunserver\fP command will be overridden +with its own runserver \%<#\:staticfiles-runserver> command. .sp Logging of each request and response of the server is sent to the -\fI\%django.server\fP logger. +django.server \%<#\:django-server-logger> logger. .INDENT 0.0 .TP .B \-\-noreload @@ -1215,8 +1216,6 @@ Uses IPv6 for the development server. This changes the default IP address from .TP .B DJANGO_RUNSERVER_HIDE_WARNING .UNINDENT -.sp - .sp By default, a warning is printed to the console that \fBrunserver\fP is not suitable for production: @@ -1325,14 +1324,14 @@ django\-admin runserver \-6 localhost:8000 .SS Serving static files with the development server .sp By default, the development server doesn\(aqt serve any static files for your site -(such as CSS files, images, things under \fI\%MEDIA_URL\fP and so forth). If +(such as CSS files, images, things under \fBMEDIA_URL\fP \%<#\:std-setting-MEDIA_URL> and so forth). If you want to configure Django to serve static media, read -\fI\%How to manage static files (e.g. images, JavaScript, CSS)\fP\&. +How to manage static files (e.g. images, JavaScript, CSS) \%<>\&. .SS Serving with ASGI in development .sp Django\(aqs \fBrunserver\fP command provides a WSGI server. In order to run under -ASGI you will need to use an \fI\%ASGI server\fP\&. -The Django Daphne project provides \fI\%Integration with runserver\fP that you can use. +ASGI you will need to use an ASGI server \%<>\&. +The Django Daphne project provides Integration with runserver \%<#\:daphne-runserver> that you can use. .SS \fBsendtestemail\fP .INDENT 0.0 .TP @@ -1357,15 +1356,15 @@ together: .B \-\-managers .UNINDENT .sp -Mails the email addresses specified in \fI\%MANAGERS\fP using -\fI\%mail_managers()\fP\&. +Mails the email addresses specified in \fBMANAGERS\fP \%<#\:std-setting-MANAGERS> using +\fBmail_managers()\fP \%<#\:django\:.core\:.mail\:.mail_managers>\&. .INDENT 0.0 .TP .B \-\-admins .UNINDENT .sp -Mails the email addresses specified in \fI\%ADMINS\fP using -\fI\%mail_admins()\fP\&. +Mails the email addresses specified in \fBADMINS\fP \%<#\:std-setting-ADMINS> using +\fBmail_admins()\fP \%<#\:django\:.core\:.mail\:.mail_admins>\&. .SS \fBshell\fP .INDENT 0.0 .TP @@ -1375,7 +1374,7 @@ Mails the email addresses specified in \fI\%ADMINS\fP using Starts the Python interactive interpreter. .sp All models from installed apps are automatically imported into the shell -environment. Models from apps listed earlier in \fI\%INSTALLED_APPS\fP take +environment. Models from apps listed earlier in \fBINSTALLED_APPS\fP \%<#\:std-setting-INSTALLED_APPS> take precedence. The following common utilities are also imported: .INDENT 0.0 .INDENT 3.5 @@ -1392,10 +1391,7 @@ For a \fB\-\-verbosity\fP of 2 or higher, the automatically imported objects wil be listed. To disable automatic importing entirely, use the \fB\-\-no\-imports\fP flag. .sp -See the guide on \fI\%customizing this behavior\fP to add or remove automatic imports. -.sp -Automatic models import was added. - +See the guide on customizing this behavior \%<#\:customizing-shell-auto-imports> to add or remove automatic imports. .sp Automatic imports of common utilities, such as \fBdjango.conf.settings\fP, were added. @@ -1405,7 +1401,7 @@ were added. .B \-\-interface {ipython,bpython,python}, \-i {ipython,bpython,python} .UNINDENT .sp -Specifies the shell to use. By default, Django will use \X'tty: link https://ipython.org/'\fI\%IPython\fP\X'tty: link' or \X'tty: link https://bpython-interpreter.org/'\fI\%bpython\fP\X'tty: link' if +Specifies the shell to use. By default, Django will use IPython \% or bpython \% if either is installed. If both are installed, specify which one you want like so: .sp IPython: @@ -1444,16 +1440,14 @@ django\-admin shell \-i python .UNINDENT .sp Disables reading the startup script for the \(dqplain\(dq Python interpreter. By -default, the script pointed to by the \X'tty: link https://docs.python.org/3/using/cmdline.html#envvar-PYTHONSTARTUP'\fI\%PYTHONSTARTUP\fP\X'tty: link' environment +default, the script pointed to by the \fBPYTHONSTARTUP\fP \% environment variable or the \fB~/.pythonrc.py\fP script is read. .INDENT 0.0 .TP .B \-\-no\-imports .UNINDENT .sp - -.sp -Disables the automatic import of models from \fI\%INSTALLED_APPS\fP\&. +Disables the automatic import of models from \fBINSTALLED_APPS\fP \%<#\:std-setting-INSTALLED_APPS>\&. .INDENT 0.0 .TP .B \-\-command COMMAND, \-c COMMAND @@ -1483,7 +1477,7 @@ $ django\-admin shell < on that platform. .SS \fBshowmigrations\fP .INDENT 0.0 .TP @@ -1528,7 +1522,7 @@ Specifies the database to examine. Defaults to \fBdefault\fP\&. .B django\-admin sqlflush .UNINDENT .sp -Prints the SQL statements that would be executed for the \fI\%flush\fP +Prints the SQL statements that would be executed for the \fBflush\fP command. .INDENT 0.0 .TP @@ -1588,12 +1582,12 @@ Specifies the database for which to print the SQL. Defaults to \fBdefault\fP\&. Squashes the migrations for \fBapp_label\fP up to and including \fBmigration_name\fP down into fewer migrations, if possible. The resulting squashed migrations can live alongside the unsquashed ones safely. For more -information, please read \fI\%Squashing migrations\fP\&. +information, please read Squashing migrations \%<#\:migration-squashing>\&. .sp When \fBstart_migration_name\fP is given, Django will only include migrations starting from and including this migration. This helps to mitigate the -squashing limitation of \fI\%RunPython\fP and -\fI\%django.db.migrations.operations.RunSQL\fP migration operations. +squashing limitation of \fBRunPython\fP \%<#\:django\:.db\:.migrations\:.operations\:.RunPython> and +\fBdjango.db.migrations.operations.RunSQL\fP \%<#\:django\:.db\:.migrations\:.operations\:.RunSQL> migration operations. .INDENT 0.0 .TP .B \-\-no\-optimize @@ -1632,7 +1626,7 @@ Generate squashed migration file without Django version and timestamp header. Creates a Django app directory structure for the given app name in the current directory or the given destination. .sp -By default, \X'tty: link https://github.com/django/django/blob/main/django/conf/app_template'\fI\%the new directory\fP\X'tty: link' contains a +By default, the new directory \% contains a \fBmodels.py\fP file and other app template files. If only the app name is given, the app directory will be created in the current working directory. .sp @@ -1688,7 +1682,7 @@ django\-admin startapp \-\-template=https://github.com/githubuser/django\-app\-t .UNINDENT .UNINDENT .sp -\fBWARNING:\fP +\fBWarning:\fP .INDENT 0.0 .INDENT 3.5 Templates provided via \fB\-\-template\fP are used as is. Malicious or poorly @@ -1723,8 +1717,8 @@ Specifies which directories in the app template should be excluded, in addition to \fB\&.git\fP and \fB__pycache__\fP\&. If this option is not provided, directories named \fB__pycache__\fP or starting with \fB\&.\fP will be excluded. .sp -The \fI\%template context\fP used for all matching -files is: +The template context (see \fBContext\fP \%<#\:django\:.template\:.Context>) used for all +matching files is: .INDENT 0.0 .IP \(bu 2 Any option passed to the \fBstartapp\fP command (among the command\(aqs supported @@ -1741,7 +1735,7 @@ options) \fBdjango_version\fP \-\- the version of Django, e.g. \fB\(aq2.0.3\(aq\fP .UNINDENT .sp -\fBWARNING:\fP +\fBWarning:\fP .INDENT 0.0 .INDENT 3.5 When the app template files are rendered with the Django template @@ -1750,7 +1744,7 @@ stray template variables contained. For example, if one of the Python files contains a docstring explaining a particular feature related to template rendering, it might result in an incorrect example. .sp -To work around this problem, you can use the \fI\%templatetag\fP +To work around this problem, you can use the \fBtemplatetag\fP \%<#\:std-templatetag-templatetag> template tag to \(dqescape\(dq the various parts of the template syntax. .sp In addition, to allow Python template files that contain Django template @@ -1760,7 +1754,7 @@ will be renamed to \fB\&.py\fP\&. .UNINDENT .UNINDENT .sp -\fBWARNING:\fP +\fBWarning:\fP .INDENT 0.0 .INDENT 3.5 The contents of custom app (or project) templates should always be @@ -1782,7 +1776,7 @@ so make sure any custom template you use is worthy of your trust. Creates a Django project directory structure for the given project name in the current directory or the given destination. .sp -By default, \X'tty: link https://github.com/django/django/blob/main/django/conf/project_template'\fI\%the new directory\fP\X'tty: link' contains +By default, the new directory \% contains \fBmanage.py\fP and a project package (containing a \fBsettings.py\fP and other files). .sp @@ -1813,7 +1807,7 @@ django\-admin startproject myproject /Users/jezdez/Code/myproject_repo .UNINDENT .sp Specifies a directory, file path, or URL of a custom project template. See the -\fI\%startapp \-\-template\fP documentation for examples and usage. The same +\fBstartapp \-\-template\fP documentation for examples and usage. The same \fBsecurity considerations\fP described for \fBstartapp\fP templates apply here: malicious or poorly constructed templates may introduce weaknesses or consume excessive resources, and templates should be carefully inspected before use. @@ -1841,7 +1835,7 @@ Specifies which directories in the project template should be excluded, in addition to \fB\&.git\fP and \fB__pycache__\fP\&. If this option is not provided, directories named \fB__pycache__\fP or starting with \fB\&.\fP will be excluded. .sp -The \fI\%template context\fP used is: +The template context (see \fBContext\fP \%<#\:django\:.template\:.Context>) used is: .INDENT 0.0 .IP \(bu 2 Any option passed to the \fBstartproject\fP command (among the command\(aqs @@ -1851,23 +1845,23 @@ supported options) .IP \(bu 2 \fBproject_directory\fP \-\- the full path of the newly created project .IP \(bu 2 -\fBsecret_key\fP \-\- a random key for the \fI\%SECRET_KEY\fP setting +\fBsecret_key\fP \-\- a random key for the \fBSECRET_KEY\fP \%<#\:std-setting-SECRET_KEY> setting .IP \(bu 2 \fBdocs_version\fP \-\- the version of the documentation: \fB\(aqdev\(aq\fP or \fB\(aq1.x\(aq\fP .IP \(bu 2 \fBdjango_version\fP \-\- the version of Django, e.g. \fB\(aq2.0.3\(aq\fP .UNINDENT .sp -Please also see the \fI\%rendering warning\fP and -\fI\%trusted code warning\fP as mentioned for -\fI\%startapp\fP\&. +Please also see the rendering warning and +trusted code warning as mentioned for +\fBstartapp\fP\&. .SS \fBtest\fP .INDENT 0.0 .TP .B django\-admin test [test_label [test_label ...]] .UNINDENT .sp -Runs tests for all installed apps. See \fI\%Testing in Django\fP for more +Runs tests for all installed apps. See Testing in Django \%<> for more information. .INDENT 0.0 .TP @@ -1881,7 +1875,7 @@ Stops running tests and reports the failure immediately after a test fails. .UNINDENT .sp Controls the test runner class that is used to execute tests. This value -overrides the value provided by the \fI\%TEST_RUNNER\fP setting. +overrides the value provided by the \fBTEST_RUNNER\fP \%<#\:std-setting-TEST_RUNNER> setting. .INDENT 0.0 .TP .B \-\-noinput, \-\-no\-input @@ -1892,8 +1886,8 @@ existing test database. .SS Test runner options .sp The \fBtest\fP command receives options on behalf of the specified -\fI\%\-\-testrunner\fP\&. These are the options of the default test runner: -\fI\%DiscoverRunner\fP\&. +\fB\-\-testrunner\fP\&. These are the options of the default test runner: +\fBDiscoverRunner\fP \%<#\:django\:.test\:.runner\:.DiscoverRunner>\&. .INDENT 0.0 .TP .B \-\-keepdb @@ -1903,7 +1897,7 @@ Preserves the test database between test runs. This has the advantage of skipping both the create and destroy actions which can greatly decrease the time to run tests, especially those in a large test suite. If the test database does not exist, it will be created on the first run and then preserved for each -subsequent run. Unless the \fI\%MIGRATE\fP test setting is +subsequent run. Unless the \fBMIGRATE\fP \%<#\:std-setting-TEST_MIGRATE> test setting is \fBFalse\fP, any unapplied migrations will also be applied to the test database before running the test suite. .INDENT 0.0 @@ -1916,7 +1910,7 @@ that aren\(aqt properly isolated. The test order generated by this option is a deterministic function of the integer seed given. When no seed is passed, a seed is chosen randomly and printed to the console. To repeat a particular test order, pass a seed. The test orders generated by this option preserve Django\(aqs -\fI\%guarantees on test order\fP\&. They also keep tests grouped +guarantees on test order \%<#\:order-of-tests>\&. They also keep tests grouped by test case class. .sp The shuffled orderings also have a special consistency property useful when @@ -1930,22 +1924,22 @@ order of the original tests will be the same in the new order. .UNINDENT .sp Sorts test cases in the opposite execution order. This may help in debugging -the side effects of tests that aren\(aqt properly isolated. \fI\%Grouping by test -class\fP is preserved when using this option. This can be used +the side effects of tests that aren\(aqt properly isolated. Grouping by test +class \%<#\:order-of-tests> is preserved when using this option. This can be used in conjunction with \fB\-\-shuffle\fP to reverse the order for a particular seed. .INDENT 0.0 .TP .B \-\-debug\-mode .UNINDENT .sp -Sets the \fI\%DEBUG\fP setting to \fBTrue\fP prior to running tests. This may +Sets the \fBDEBUG\fP \%<#\:std-setting-DEBUG> setting to \fBTrue\fP prior to running tests. This may help troubleshoot test failures. .INDENT 0.0 .TP .B \-\-debug\-sql, \-d .UNINDENT .sp -Enables \fI\%SQL logging\fP for failing tests. If +Enables SQL logging \%<#\:django-db-logger> for failing tests. If \fB\-\-verbosity\fP is \fB2\fP, then queries in passing tests are also output. .INDENT 0.0 .TP @@ -1960,12 +1954,12 @@ Runs tests in separate parallel processes. Since modern processors have multiple cores, this allows running tests significantly faster. .sp Using \fB\-\-parallel\fP without a value, or with the value \fBauto\fP, runs one test -process per core according to \X'tty: link https://docs.python.org/3/library/multiprocessing.html#multiprocessing.cpu_count'\fI\%multiprocessing.cpu_count()\fP\X'tty: link'\&. You can +process per core according to \fBmultiprocessing.cpu_count()\fP \%\&. You can override this by passing the desired number of processes, e.g. -\fB\-\-parallel 4\fP, or by setting the \fI\%DJANGO_TEST_PROCESSES\fP environment +\fB\-\-parallel 4\fP, or by setting the \fBDJANGO_TEST_PROCESSES\fP environment variable. .sp -Django distributes test cases — \X'tty: link https://docs.python.org/3/library/unittest.html#unittest.TestCase'\fI\%unittest.TestCase\fP\X'tty: link' subclasses — to +Django distributes test cases — \fBunittest.TestCase\fP \% subclasses — to subprocesses. If there are fewer test case classes than configured processes, Django will reduce the number of processes accordingly. .sp @@ -1973,12 +1967,12 @@ Each process gets its own database. You must ensure that different test case classes don\(aqt access the same resources. For instance, test case classes that touch the filesystem should create a temporary directory for their own use. .sp -\fBNOTE:\fP +\fBNote:\fP .INDENT 0.0 .INDENT 3.5 If you have test classes that cannot be run in parallel, you can use -\fBSerializeMixin\fP to run them sequentially. See \fI\%Enforce running test -classes sequentially\fP\&. +\fBSerializeMixin\fP to run them sequentially. See Enforce running test +classes sequentially \%<#\:topics-testing-enforce-run-sequentially>\&. .UNINDENT .UNINDENT .sp @@ -1996,11 +1990,11 @@ $ python \-m pip install tblib This feature isn\(aqt available on Windows. It doesn\(aqt work with the Oracle database backend either. .sp -If you want to use \X'tty: link https://docs.python.org/3/library/pdb.html#module-pdb'\fI\%pdb\fP\X'tty: link' while debugging tests, you must disable parallel +If you want to use \fBpdb\fP \% while debugging tests, you must disable parallel execution (\fB\-\-parallel=1\fP). You\(aqll see something like \fBbdb.BdbQuit\fP if you don\(aqt. .sp -\fBWARNING:\fP +\fBWarning:\fP .INDENT 0.0 .INDENT 3.5 When test parallelization is enabled and a test fails, Django may be @@ -2010,7 +2004,7 @@ parallelization to see the traceback of the failure. .sp This is a known limitation. It arises from the need to serialize objects in order to exchange them between processes. See -\X'tty: link https://docs.python.org/3/library/pickle.html#pickle-picklable'\fI\%What can be pickled and unpickled?\fP\X'tty: link' for details. +What can be pickled and unpickled? \% for details. .UNINDENT .UNINDENT .INDENT 0.0 @@ -2018,8 +2012,8 @@ in order to exchange them between processes. See .B \-\-tag TAGS .UNINDENT .sp -Runs only tests \fI\%marked with the specified tags\fP\&. -May be specified multiple times and combined with \fI\%test \-\-exclude\-tag\fP\&. +Runs only tests marked with the specified tags \%<#\:topics-tagging-tests>\&. +May be specified multiple times and combined with \fBtest \-\-exclude\-tag\fP\&. .sp Tests that fail to load are always considered matching. .INDENT 0.0 @@ -2027,15 +2021,15 @@ Tests that fail to load are always considered matching. .B \-\-exclude\-tag EXCLUDE_TAGS .UNINDENT .sp -Excludes tests \fI\%marked with the specified tags\fP\&. -May be specified multiple times and combined with \fI\%test \-\-tag\fP\&. +Excludes tests marked with the specified tags \%<#\:topics-tagging-tests>\&. +May be specified multiple times and combined with \fBtest \-\-tag\fP\&. .INDENT 0.0 .TP .B \-k TEST_NAME_PATTERNS .UNINDENT .sp Runs test methods and classes matching test name patterns, in the same way as -\X'tty: link https://docs.python.org/3/library/unittest.html#cmdoption-unittest-k'\fI\%unittest\(aqs \-k option\fP\X'tty: link'\&. Can be specified multiple times. +\fBunittest\(aqs \-k option\fP \%\&. Can be specified multiple times. .INDENT 0.0 .TP .B \-\-pdb @@ -2049,13 +2043,13 @@ installed, \fBipdb\fP is used instead. .UNINDENT .sp Discards output (\fBstdout\fP and \fBstderr\fP) for passing tests, in the same way -as \X'tty: link https://docs.python.org/3/library/unittest.html#cmdoption-unittest-b'\fI\%unittest\(aqs \-\-buffer option\fP\X'tty: link'\&. +as \fBunittest\(aqs \-\-buffer option\fP \%\&. .INDENT 0.0 .TP .B \-\-no\-faulthandler .UNINDENT .sp -Django automatically calls \X'tty: link https://docs.python.org/3/library/faulthandler.html#faulthandler.enable'\fI\%faulthandler.enable()\fP\X'tty: link' when starting the +Django automatically calls \fBfaulthandler.enable()\fP \% when starting the tests, which allows it to print a traceback if the interpreter crashes. Pass \fB\-\-no\-faulthandler\fP to disable this behavior. .INDENT 0.0 @@ -2076,7 +2070,7 @@ Shows the N slowest test cases (N=0 for all). .B django\-admin testserver [fixture [fixture ...]] .UNINDENT .sp -Runs a Django development server (as in \fI\%runserver\fP) using data from +Runs a Django development server (as in \fBrunserver\fP) using data from the given fixture(s). .sp For example, this command: @@ -2092,33 +2086,33 @@ django\-admin testserver mydata.json \&...would perform the following steps: .INDENT 0.0 .IP 1. 3 -Create a test database, as described in \fI\%The test database\fP\&. +Create a test database, as described in The test database \%<#\:the-test-database>\&. .IP 2. 3 Populate the test database with fixture data from the given fixtures. -(For more on fixtures, see the documentation for \fI\%loaddata\fP above.) +(For more on fixtures, see the documentation for \fBloaddata\fP above.) .IP 3. 3 -Runs the Django development server (as in \fI\%runserver\fP), pointed at +Runs the Django development server (as in \fBrunserver\fP), pointed at this newly created test database instead of your production database. .UNINDENT .sp This is useful in a number of ways: .INDENT 0.0 .IP \(bu 2 -When you\(aqre writing \fI\%unit tests\fP of how your +When you\(aqre writing unit tests \%<> of how your views act with certain fixture data, you can use \fBtestserver\fP to interact with the views in a web browser, manually. .IP \(bu 2 Let\(aqs say you\(aqre developing your Django application and have a \(dqpristine\(dq copy of a database that you\(aqd like to interact with. You can dump your -database to a \fI\%fixture\fP (using the -\fI\%dumpdata\fP command, explained above), then use \fBtestserver\fP to run +database to a fixture \%<#\:fixtures-explanation> (using the +\fBdumpdata\fP command, explained above), then use \fBtestserver\fP to run your web application with that data. With this arrangement, you have the flexibility of messing up your data in any way, knowing that whatever data changes you\(aqre making are only being made to a test database. .UNINDENT .sp Note that this server does \fInot\fP automatically detect changes to your Python -source code (as \fI\%runserver\fP does). It does, however, detect changes to +source code (as \fBrunserver\fP does). It does, however, detect changes to templates. .INDENT 0.0 .TP @@ -2127,7 +2121,7 @@ templates. .sp Specifies a different port, or IP address and port, from the default of \fB127.0.0.1:8000\fP\&. This value follows exactly the same format and serves -exactly the same function as the argument to the \fI\%runserver\fP command. +exactly the same function as the argument to the \fBrunserver\fP command. .sp Examples: .sp @@ -2165,8 +2159,8 @@ existing test database. .SH COMMANDS PROVIDED BY APPLICATIONS .sp Some commands are only available when the \fBdjango.contrib\fP application that -\fI\%implements\fP them has been -\fI\%enabled\fP\&. This section describes them grouped by +implements \%<> them has been +\fBenabled\fP \%<#\:std-setting-INSTALLED_APPS>\&. This section describes them grouped by their application. .SS \fBdjango.contrib.auth\fP .SS \fBchangepassword\fP @@ -2175,7 +2169,7 @@ their application. .B django\-admin changepassword [] .UNINDENT .sp -This command is only available if Django\(aqs \fI\%authentication system\fP (\fBdjango.contrib.auth\fP) is installed. +This command is only available if Django\(aqs authentication system \%<> (\fBdjango.contrib.auth\fP) is installed. .sp Allows changing a user\(aqs password. It prompts you to enter a new password twice for the given user. If the entries are identical, this immediately becomes the @@ -2207,7 +2201,7 @@ django\-admin changepassword ringo .B DJANGO_SUPERUSER_PASSWORD .UNINDENT .sp -This command is only available if Django\(aqs \fI\%authentication system\fP (\fBdjango.contrib.auth\fP) is installed. +This command is only available if Django\(aqs authentication system \%<> (\fBdjango.contrib.auth\fP) is installed. .sp Creates a superuser account (a user who has all permissions). This is useful if you need to create an initial superuser account or if you need to @@ -2215,14 +2209,14 @@ programmatically generate superuser accounts for your site(s). .sp When run interactively, this command will prompt for a password for the new superuser account. When run non\-interactively, you can provide -a password by setting the \fI\%DJANGO_SUPERUSER_PASSWORD\fP environment +a password by setting the \fBDJANGO_SUPERUSER_PASSWORD\fP environment variable. Otherwise, no password will be set, and the superuser account will not be able to log in until a password has been manually set for it. .sp In non\-interactive mode, the -\fI\%USERNAME_FIELD\fP and required +\fBUSERNAME_FIELD\fP \%<#\:django\:.contrib\:.auth\:.models\:.CustomUser\:.USERNAME_FIELD> and required fields (listed in -\fI\%REQUIRED_FIELDS\fP) fall back to +\fBREQUIRED_FIELDS\fP \%<#\:django\:.contrib\:.auth\:.models\:.CustomUser\:.REQUIRED_FIELDS>) fall back to \fBDJANGO_SUPERUSER_\fP environment variables, unless they are overridden by a command line argument. For example, to provide an \fBemail\fP field, you can use \fBDJANGO_SUPERUSER_EMAIL\fP environment variable. @@ -2257,7 +2251,7 @@ You can subclass the management command and override \fBget_input_data()\fP if you want to customize data input and validation. Consult the source code for details on the existing implementation and the method\(aqs parameters. For example, it could be useful if you have a \fBForeignKey\fP in -\fI\%REQUIRED_FIELDS\fP and want to +\fBREQUIRED_FIELDS\fP \%<#\:django\:.contrib\:.auth\:.models\:.CustomUser\:.REQUIRED_FIELDS> and want to allow creating an instance instead of entering the primary key of an existing instance. .SS \fBdjango.contrib.contenttypes\fP @@ -2267,7 +2261,7 @@ instance. .B django\-admin remove_stale_contenttypes .UNINDENT .sp -This command is only available if Django\(aqs \fI\%contenttypes app\fP (\fI\%django.contrib.contenttypes\fP) is installed. +This command is only available if Django\(aqs contenttypes app \%<> (\fBdjango.contrib.contenttypes\fP \%<#\:module-django\:.contrib\:.contenttypes>) is installed. .sp Deletes stale content types (from deleted models) in your database. Any objects that depend on the deleted content types will also be deleted. A list of @@ -2285,14 +2279,14 @@ Specifies the database to use. Defaults to \fBdefault\fP\&. .UNINDENT .sp Deletes stale content types including ones from previously installed apps that -have been removed from \fI\%INSTALLED_APPS\fP\&. Defaults to \fBFalse\fP\&. +have been removed from \fBINSTALLED_APPS\fP \%<#\:std-setting-INSTALLED_APPS>\&. Defaults to \fBFalse\fP\&. .SS \fBdjango.contrib.gis\fP .SS \fBogrinspect\fP .sp -This command is only available if \fI\%GeoDjango\fP +This command is only available if GeoDjango \%<> (\fBdjango.contrib.gis\fP) is installed. .sp -Please refer to its \fI\%description\fP in the GeoDjango +Please refer to its \fBdescription\fP \%<#\:django-admin-ogrinspect> in the GeoDjango documentation. .SS \fBdjango.contrib.sessions\fP .SS \fBclearsessions\fP @@ -2305,16 +2299,16 @@ Can be run as a cron job or directly to clean out expired sessions. .SS \fBdjango.contrib.staticfiles\fP .SS \fBcollectstatic\fP .sp -This command is only available if the \fI\%static files application\fP (\fBdjango.contrib.staticfiles\fP) is installed. +This command is only available if the static files application \%<> (\fBdjango.contrib.staticfiles\fP) is installed. .sp -Please refer to its \fI\%description\fP in the -\fI\%staticfiles\fP documentation. +Please refer to its \fBdescription\fP \%<#\:django-admin-collectstatic> in the +staticfiles \%<> documentation. .SS \fBfindstatic\fP .sp -This command is only available if the \fI\%static files application\fP (\fBdjango.contrib.staticfiles\fP) is installed. +This command is only available if the static files application \%<> (\fBdjango.contrib.staticfiles\fP) is installed. .sp -Please refer to its \fI\%description\fP in the -\fI\%staticfiles\fP documentation. +Please refer to its \fBdescription\fP \%<#\:django-admin-findstatic> in the +staticfiles \%<> documentation. .SH DEFAULT OPTIONS .sp Although some commands may allow their own custom options, every command @@ -2324,9 +2318,9 @@ allows for the following options by default: .B \-\-pythonpath PYTHONPATH .UNINDENT .sp -Adds the given filesystem path to the Python \X'tty: link https://docs.python.org/3/library/sys.html#sys.path'\fI\%sys.path\fP\X'tty: link' module +Adds the given filesystem path to the Python \fBsys.path\fP \% module attribute. If this isn\(aqt provided, \fBdjango\-admin\fP will use the -\X'tty: link https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH'\fI\%PYTHONPATH\fP\X'tty: link' environment variable. +\fBPYTHONPATH\fP \% environment variable. .sp This option is unnecessary in \fBmanage.py\fP, because it takes care of setting the Python path for you. @@ -2347,7 +2341,7 @@ django\-admin migrate \-\-pythonpath=\(aq/home/djangoprojects/myproject\(aq .sp Specifies the settings module to use. The settings module should be in Python package syntax, e.g. \fBmysite.settings\fP\&. If this isn\(aqt provided, -\fBdjango\-admin\fP will use the \fI\%DJANGO_SETTINGS_MODULE\fP environment +\fBdjango\-admin\fP will use the \fBDJANGO_SETTINGS_MODULE\fP \%<#\:envvar-DJANGO_SETTINGS_MODULE> environment variable. .sp This option is unnecessary in \fBmanage.py\fP, because it uses @@ -2367,11 +2361,11 @@ django\-admin migrate \-\-settings=mysite.settings .B \-\-traceback .UNINDENT .sp -Displays a full stack trace when a \fI\%CommandError\fP +Displays a full stack trace when a \fBCommandError\fP \%<#\:django\:.core\:.management\:.CommandError> is raised. By default, \fBdjango\-admin\fP will show an error message when a \fBCommandError\fP occurs and a full stack trace for any other exception. .sp -This option is ignored by \fI\%runserver\fP\&. +This option is ignored by \fBrunserver\fP\&. .sp Example usage: .INDENT 0.0 @@ -2400,7 +2394,7 @@ should print to the console. \fB3\fP means \fIvery\fP verbose output. .UNINDENT .sp -This option is ignored by \fI\%runserver\fP\&. +This option is ignored by \fBrunserver\fP\&. .sp Example usage: .INDENT 0.0 @@ -2435,7 +2429,7 @@ django\-admin runserver \-\-no\-color .UNINDENT .sp Forces colorization of the command output if it would otherwise be disabled -as discussed in \fI\%Syntax coloring\fP\&. For example, you may want to pipe +as discussed in Syntax coloring\&. For example, you may want to pipe colored output to another command. .INDENT 0.0 .TP @@ -2444,7 +2438,7 @@ colored output to another command. .sp Skips running system checks prior to running the command. This option is only available if the -\fI\%requires_system_checks\fP command +\fBrequires_system_checks\fP \%<#\:django\:.core\:.management\:.BaseCommand\:.requires_system_checks> command attribute is not an empty list or tuple. .sp Example usage: @@ -2466,10 +2460,10 @@ django\-admin migrate \-\-skip\-checks The \fBdjango\-admin\fP / \fBmanage.py\fP commands will use pretty color\-coded output if your terminal supports ANSI\-colored output. It won\(aqt use the color codes if you\(aqre piping the command\(aqs output to -another program unless the \fI\%\-\-force\-color\fP option is used. +another program unless the \fB\-\-force\-color\fP option is used. .SS Windows support .sp -On Windows 10, the \X'tty: link https://www.microsoft.com/en-us/p/windows-terminal-preview/9n0dx20hk701'\fI\%Windows Terminal\fP\X'tty: link' application, \X'tty: link https://code.visualstudio.com'\fI\%VS Code\fP\X'tty: link', and PowerShell +On Windows 10, the Windows Terminal \% application, VS Code \%, and PowerShell (where virtual terminal processing is enabled) allow colored output, and are supported by default. .sp @@ -2478,7 +2472,7 @@ escape sequences so by default there is no color output. In this case either of two third\-party libraries are needed: .INDENT 0.0 .IP \(bu 2 -Install \X'tty: link https://pypi.org/project/colorama/'\fI\%colorama\fP\X'tty: link', a Python package that translates ANSI color codes +Install colorama \%, a Python package that translates ANSI color codes into Windows API calls. Django commands will detect its presence and will make use of its services to color output just like on Unix\-based platforms. \fBcolorama\fP can be installed via pip: @@ -2491,7 +2485,7 @@ make use of its services to color output just like on Unix\-based platforms. .UNINDENT .UNINDENT .IP \(bu 2 -Install \X'tty: link http://adoxa.altervista.org/ansicon/'\fI\%ANSICON\fP\X'tty: link', a third\-party tool that allows \fBcmd.exe\fP to process +Install ANSICON \%, a third\-party tool that allows \fBcmd.exe\fP to process ANSI color codes. Django commands will detect its presence and will make use of its services to color output just like on Unix\-based platforms. .UNINDENT @@ -2515,7 +2509,7 @@ background. \fBnocolor\fP, which disables syntax highlighting. .UNINDENT .sp -You select a palette by setting a \fI\%DJANGO_COLORS\fP environment +You select a palette by setting a \fBDJANGO_COLORS\fP environment variable to specify the palette you want to use. For example, to specify the \fBlight\fP palette under a Unix or OS/X BASH shell, you would run the following at a command prompt: @@ -2650,7 +2644,7 @@ overridden as specified. .SS Bash completion .sp If you use the Bash shell, consider installing the Django bash completion -script, which lives in \X'tty: link https://github.com/django/django/blob/main/extras/django_bash_completion'\fI\%extras/django_bash_completion\fP\X'tty: link' in the Django +script, which lives in extras/django_bash_completion \% in the Django source distribution. It enables tab\-completion of \fBdjango\-admin\fP and \fBmanage.py\fP commands, so you can, for instance... .INDENT 0.0 @@ -2663,12 +2657,12 @@ Type \fBsql\fP, then [TAB], to see all available options whose names start with \fBsql\fP\&. .UNINDENT .sp -See \fI\%How to create custom django\-admin commands\fP for how to add customized actions. +See How to create custom django\-admin commands \%<> for how to add customized actions. .SS Black formatting .sp -The Python files created by \fI\%startproject\fP, \fI\%startapp\fP, -\fI\%optimizemigration\fP, \fI\%makemigrations\fP, and -\fI\%squashmigrations\fP are formatted using the \fBblack\fP command if it is +The Python files created by \fBstartproject\fP, \fBstartapp\fP, +\fBoptimizemigration\fP, \fBmakemigrations\fP, and +\fBsquashmigrations\fP are formatted using the \fBblack\fP command if it is present on your \fBPATH\fP\&. .sp If you have \fBblack\fP globally installed, but do not wish it used for the @@ -2784,9 +2778,8 @@ with open(\(dq/path/to/command_output\(dq, \(dqw\(dq) as f: .EE .UNINDENT .UNINDENT -.SH AUTHOR +.SH Author Django Software Foundation -.SH COPYRIGHT +.SH Copyright Django Software Foundation and contributors -.\" Generated by docutils manpage writer. -. +.\" End of generated man page. diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 548bd5e40566..e814e0aca09b 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -3025,8 +3025,6 @@ Templates can override or extend base admin templates as described in .. attribute:: AdminSite.password_change_form - .. versionadded:: 6.0 - Subclass of :class:`~django.contrib.auth.forms.PasswordChangeForm` that will be used by the admin site password change view. diff --git a/docs/ref/contrib/gis/forms-api.txt b/docs/ref/contrib/gis/forms-api.txt index a605ac3fd8cf..c65fd78692b3 100644 --- a/docs/ref/contrib/gis/forms-api.txt +++ b/docs/ref/contrib/gis/forms-api.txt @@ -98,8 +98,6 @@ from other Django widget attributes. .. attribute:: BaseGeometryWidget.base_layer - .. versionadded:: 6.0 - A string that specifies the identifier for the default base map layer to be used by the corresponding JavaScript map widget. It is passed as part of the widget options when rendering, allowing the ``MapWidget`` to determine @@ -157,8 +155,6 @@ Widget classes .. attribute:: base_layer - .. versionadded:: 6.0 - ``nasaWorldview`` .. attribute:: template_name @@ -205,8 +201,6 @@ Widget classes .. attribute:: base_layer - .. versionadded:: 6.0 - ``osm`` .. attribute:: default_lat @@ -238,18 +232,11 @@ Widget classes .. _FAQ answer: https://help.openstreetmap.org/questions/10920/how-to-embed-a-map-in-my-https-site - .. versionchanged:: 6.0 - - The ``OSMWidget`` no longer uses a custom template. Consequently, the - ``gis/openlayers-osm.html`` template was removed. - .. _geometry-widgets-customization: Customizing the base layer used in OpenLayers-based widgets ----------------------------------------------------------- -.. versionadded:: 6.0 - To customize the base layer displayed in OpenLayers-based geometry widgets, define a new layer builder in a custom JavaScript file. For example: diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt index 2c4d344867ac..b88ace5fabea 100644 --- a/docs/ref/contrib/gis/functions.txt +++ b/docs/ref/contrib/gis/functions.txt @@ -323,8 +323,6 @@ reversed coordinates. ``Rotate`` ---------- -.. versionadded:: 6.0 - .. class:: Rotate(expression, angle, origin=None, **extra) *Availability*: `PostGIS `__ @@ -609,10 +607,6 @@ result. __ https://en.wikipedia.org/wiki/Geohash -.. versionchanged:: 6.0 - - MariaDB 12.0.1+ support was added. - Miscellaneous ============= @@ -643,15 +637,9 @@ geometry. Returns ``True`` if its value is empty and ``False`` otherwise. Accepts a geographic field or expression and tests if the value is well formed. Returns ``True`` if its value is a valid geometry and ``False`` otherwise. -.. versionchanged:: 6.0 - - MariaDB 12.0.1+ support was added. - ``GeometryType`` ---------------- -.. versionadded:: 6.0 - .. class:: GeometryType(expr) *Availability*: `PostGIS `__, diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt index 70ac9d4d28e4..255aefdd84c4 100644 --- a/docs/ref/contrib/gis/geoquerysets.txt +++ b/docs/ref/contrib/gis/geoquerysets.txt @@ -205,10 +205,6 @@ MySQL ``MBRCoveredBy(poly, geom)`` SpatiaLite ``CoveredBy(poly, geom)`` ========== ============================= -.. versionchanged:: 6.0 - - MariaDB 12.0.1+ support was added. - .. fieldlookup:: covers ``covers`` @@ -395,17 +391,11 @@ MariaDB, MySQL, PostGIS, SpatiaLite ``ST_IsValid(poly)`` Oracle ``SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(poly, 0.05) = 'TRUE'`` =================================== ================================================================ -.. versionchanged:: 6.0 - - MariaDB 12.0.1+ support was added. - .. fieldlookup:: geom_type ``geom_type`` ------------- -.. versionadded:: 6.0 - *Availability*: `PostGIS `__, Oracle 23c+, MariaDB, MySQL, SpatiaLite @@ -947,10 +937,6 @@ geometry column. This is analogous to a simplified version of the than performing a union because it rolls up geometries into a collection or multi object, not caring about dissolving boundaries. -.. versionchanged:: 6.0 - - MariaDB 12.0.1+ support was added. - ``Extent`` ~~~~~~~~~~ diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt index c107e6826205..31ab8f10085b 100644 --- a/docs/ref/contrib/gis/geos.txt +++ b/docs/ref/contrib/gis/geos.txt @@ -318,8 +318,6 @@ Properties .. attribute:: GEOSGeometry.hasm - .. versionadded:: 6.0 - Returns a boolean indicating whether the geometry has the M dimension. Requires GEOS 3.12. diff --git a/docs/ref/contrib/postgres/aggregates.txt b/docs/ref/contrib/postgres/aggregates.txt index 6381f0f7ebb5..438613658a14 100644 --- a/docs/ref/contrib/postgres/aggregates.txt +++ b/docs/ref/contrib/postgres/aggregates.txt @@ -209,11 +209,6 @@ General-purpose aggregation functions expression representing the string for separating values. For example, ``Value(",")``. - .. versionadded:: 6.0 - - Support for providing a ``Value`` or expression rather than a - string was added. - .. deprecated:: 6.0 Support for providing a string is deprecated. diff --git a/docs/ref/contrib/postgres/operations.txt b/docs/ref/contrib/postgres/operations.txt index e2b9af4f6033..54885a0a337a 100644 --- a/docs/ref/contrib/postgres/operations.txt +++ b/docs/ref/contrib/postgres/operations.txt @@ -52,8 +52,6 @@ them. In that case, connect to your Django database and run the query .. attribute:: hints - .. versionadded:: 6.0 - The optional ``hints`` argument will be passed as ``**hints`` to the :meth:`allow_migrate` method of database routers to assist them in :ref:`making routing decisions `. @@ -67,8 +65,6 @@ them. In that case, connect to your Django database and run the query .. attribute:: hints - .. versionadded:: 6.0 - The optional ``hints`` argument will be passed as ``**hints`` to the :meth:`allow_migrate` method of database routers to assist them in :ref:`making routing decisions `. @@ -82,8 +78,6 @@ them. In that case, connect to your Django database and run the query .. attribute:: hints - .. versionadded:: 6.0 - The optional ``hints`` argument will be passed as ``**hints`` to the :meth:`allow_migrate` method of database routers to assist them in :ref:`making routing decisions `. @@ -97,8 +91,6 @@ them. In that case, connect to your Django database and run the query .. attribute:: hints - .. versionadded:: 6.0 - The optional ``hints`` argument will be passed as ``**hints`` to the :meth:`allow_migrate` method of database routers to assist them in :ref:`making routing decisions `. @@ -112,8 +104,6 @@ them. In that case, connect to your Django database and run the query .. attribute:: hints - .. versionadded:: 6.0 - The optional ``hints`` argument will be passed as ``**hints`` to the :meth:`allow_migrate` method of database routers to assist them in :ref:`making routing decisions `. @@ -127,8 +117,6 @@ them. In that case, connect to your Django database and run the query .. attribute:: hints - .. versionadded:: 6.0 - The optional ``hints`` argument will be passed as ``**hints`` to the :meth:`allow_migrate` method of database routers to assist them in :ref:`making routing decisions `. @@ -143,8 +131,6 @@ them. In that case, connect to your Django database and run the query .. attribute:: hints - .. versionadded:: 6.0 - The optional ``hints`` argument will be passed as ``**hints`` to the :meth:`allow_migrate` method of database routers to assist them in :ref:`making routing decisions `. @@ -158,8 +144,6 @@ them. In that case, connect to your Django database and run the query .. attribute:: hints - .. versionadded:: 6.0 - The optional ``hints`` argument will be passed as ``**hints`` to the :meth:`allow_migrate` method of database routers to assist them in :ref:`making routing decisions `. @@ -173,8 +157,6 @@ them. In that case, connect to your Django database and run the query .. attribute:: hints - .. versionadded:: 6.0 - The optional ``hints`` argument will be passed as ``**hints`` to the :meth:`allow_migrate` method of database routers to assist them in :ref:`making routing decisions `. diff --git a/docs/ref/contrib/postgres/search.txt b/docs/ref/contrib/postgres/search.txt index 15f4909e0ffc..8d693f3bf019 100644 --- a/docs/ref/contrib/postgres/search.txt +++ b/docs/ref/contrib/postgres/search.txt @@ -119,10 +119,6 @@ Examples: See :ref:`postgresql-fts-search-configuration` for an explanation of the ``config`` parameter. -.. versionchanged:: 6.0 - - :class:`Lexeme` objects were added. - ``SearchRank`` ============== @@ -284,8 +280,6 @@ floats to :class:`SearchRank` as ``weights`` in the same order above: ``Lexeme`` ========== -.. versionadded:: 6.0 - .. class:: Lexeme(value, output_field=None, *, invert=False, prefix=False, weight=None) ``Lexeme`` objects allow search operators to be safely used with strings from diff --git a/docs/ref/csp.txt b/docs/ref/csp.txt index 0498d90ab8c3..d86c08237f64 100644 --- a/docs/ref/csp.txt +++ b/docs/ref/csp.txt @@ -2,8 +2,6 @@ Content Security Policy ======================= -.. versionadded:: 6.0 - .. module:: django.middleware.csp :synopsis: Middleware for Content Security Policy headers diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 030d2f28ddc1..adbd2465a719 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -1079,11 +1079,6 @@ flag. See the guide on :ref:`customizing this behavior ` to add or remove automatic imports. -.. versionchanged:: 6.0 - - Automatic imports of common utilities, such as ``django.conf.settings``, - were added. - .. django-admin-option:: --interface {ipython,bpython,python}, -i {ipython,bpython,python} Specifies the shell to use. By default, Django will use IPython_ or bpython_ if @@ -1274,10 +1269,6 @@ If the optional destination is provided, Django will use that name instead. If the directory with the given name doesn't exist, it will be created. You can use '.' to denote the current working directory. -.. versionchanged:: 6.0 - - Automatic creation of the destination directory was added. - For example: .. console:: @@ -1400,10 +1391,6 @@ project directory, and create ``manage.py`` and the project package within it. If the directory with the given name doesn't exist, it will be created. Use '.' to denote the current working directory. -.. versionchanged:: 6.0 - - Automatic creation of the destination directory was added. - For example: .. console:: diff --git a/docs/ref/exceptions.txt b/docs/ref/exceptions.txt index 4ffff03457ce..1f3e84a7f558 100644 --- a/docs/ref/exceptions.txt +++ b/docs/ref/exceptions.txt @@ -36,8 +36,6 @@ Django core exception classes are defined in ``django.core.exceptions``. ``ObjectNotUpdated`` -------------------- -.. versionadded:: 6.0 - .. exception:: ObjectNotUpdated The base class for :exc:`Model.NotUpdated diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt index e53c51039354..e262193699a2 100644 --- a/docs/ref/middleware.txt +++ b/docs/ref/middleware.txt @@ -616,8 +616,6 @@ Content Security Policy middleware .. class:: ContentSecurityPolicyMiddleware -.. versionadded:: 6.0 - Adds support for Content Security Policy (CSP), which helps mitigate risks such as Cross-Site Scripting (XSS) and data injection attacks by controlling the sources of content that can be loaded in the browser. See the diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt index b12613b95214..fe33fa166da8 100644 --- a/docs/ref/migration-operations.txt +++ b/docs/ref/migration-operations.txt @@ -195,13 +195,6 @@ if the field is nullable or if it has a default value that can be used to populate the recreated column. If the field is not nullable and does not have a default value, the operation is irreversible. -.. versionchanged:: 6.0 - - :class:`~django.db.backends.base.schema.BaseDatabaseSchemaEditor` and - PostgreSQL backends no longer use ``CASCADE`` to delete dependent related - database objects, such as views. Any dependent objects that are not managed - by Django may need to be removed manually before running ``RemoveField``. - ``AlterField`` -------------- diff --git a/docs/ref/models/class.txt b/docs/ref/models/class.txt index c36eeaa34f24..5e3fc8b88e2f 100644 --- a/docs/ref/models/class.txt +++ b/docs/ref/models/class.txt @@ -42,8 +42,6 @@ Attributes ``NotUpdated`` -------------- -.. versionadded:: 6.0 - .. exception:: Model.NotUpdated This exception is raised when :ref:`a forced update diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt index 81aa3a92b2c2..79c939fa382e 100644 --- a/docs/ref/models/expressions.txt +++ b/docs/ref/models/expressions.txt @@ -236,12 +236,6 @@ MariaDB). For example: >>> reporter.stories_filed # This triggers a refresh query on MySQL/MariaDB. 14 # Assuming the database value was 13 when the object was saved. -.. versionchanged:: 6.0 - - In previous versions of Django, ``F()`` objects were not refreshed from the - database on :meth:`~Model.save` which resulted in them being evaluated and - persisted every time the instance was saved. - Using ``F()`` in filters ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -490,8 +484,6 @@ The ``Aggregate`` API is as follows: .. attribute:: allow_order_by - .. versionadded:: 6.0 - A class attribute determining whether or not this aggregate function allows passing a ``order_by`` keyword argument. If set to ``False`` (default), ``TypeError`` is raised if ``order_by`` is passed as a value @@ -529,10 +521,6 @@ grouping) contains no entries. The ``**extra`` kwargs are ``key=value`` pairs that can be interpolated into the ``template`` attribute. -.. versionchanged:: 6.0 - - The ``order_by`` argument was added. - Creating your own Aggregate Functions ------------------------------------- diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 4405d91daf6e..55cf3e7d3473 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1366,12 +1366,6 @@ materialized view. .. _PostgreSQL: https://www.postgresql.org/docs/current/ddl-generated-columns.html .. _SQLite: https://www.sqlite.org/gencol.html#limitations -.. versionchanged:: 6.0 - - ``GeneratedField``\s are now automatically refreshed from the database on - backends that support it (SQLite, PostgreSQL, and Oracle) and marked as - deferred otherwise. - :attr:`~Field.null` has no effect on ``GeneratedField`` since whether the column is nullable depends on the database and expression used. diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index 8b9fb1aff4a0..5a9bf421d477 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -610,12 +610,6 @@ You can pass ``force_insert=(models.Model,)`` to force an ``INSERT`` statement for all parents. By default, ``force_insert=True`` only forces the insertion of a new row for the current model. -.. versionchanged:: 6.0 - - When a forced update does not affect any rows a - :exc:`~django.db.models.Model.NotUpdated` exception is raised. On previous - versions a generic :exc:`django.db.DatabaseError` was raised. - It should be very rare that you'll need to use these parameters. Django will almost always do the right thing and trying to override that will lead to errors that are difficult to track down. This feature is for advanced use diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 081a0d6a99c8..93bddf90b050 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -4019,8 +4019,6 @@ by the aggregate. ``AnyValue`` ~~~~~~~~~~~~ -.. versionadded:: 6.0 - .. class:: AnyValue(expression, output_field=None, filter=None, default=None, **extra) Returns an arbitrary value from the non-null input values. @@ -4225,8 +4223,6 @@ by the aggregate. ``StringAgg`` ~~~~~~~~~~~~~ -.. versionadded:: 6.0 - .. class:: StringAgg(expression, delimiter, output_field=None, distinct=False, filter=None, order_by=None, default=None, **extra) Returns the input values concatenated into a string, separated by the diff --git a/docs/ref/paginator.txt b/docs/ref/paginator.txt index 549b9f4cd62c..01def5329554 100644 --- a/docs/ref/paginator.txt +++ b/docs/ref/paginator.txt @@ -170,8 +170,6 @@ Attributes ``AsyncPaginator`` class ======================== -.. versionadded:: 6.0 - .. class:: AsyncPaginator(object_list, per_page, orphans=0, allow_empty_first_page=True, error_messages=None) Asynchronous version of :class:`Paginator`. @@ -259,8 +257,6 @@ Attributes ``AsyncPage`` class =================== -.. versionadded:: 6.0 - .. class:: AsyncPage(object_list, number, paginator) Asynchronous version of :class:`Page`. diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 97c16717fe8c..95cdb217f0f1 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -56,10 +56,6 @@ Each item in the list should be an email address string. Example:: ADMINS = ["john@example.com", '"Ng, Mary" '] -.. versionchanged:: 6.0 - - In older versions, required a list of (name, address) tuples. - .. setting:: ALLOWED_HOSTS ``ALLOWED_HOSTS`` @@ -1284,11 +1280,6 @@ Default: ``'``:class:`django.db.models.BigAutoField`\ ``'`` Default primary key field type to use for models that don't have a field with :attr:`primary_key=True `. -.. versionchanged:: 6.0 - - In older versions, the default value is - :class:`django.db.models.AutoField`. - .. admonition:: Migrating auto-created through tables The value of ``DEFAULT_AUTO_FIELD`` will be respected when creating new @@ -2242,10 +2233,6 @@ A list in the same format as :setting:`ADMINS` that specifies who should get broken link notifications when :class:`~django.middleware.common.BrokenLinkEmailsMiddleware` is enabled. -.. versionchanged:: 6.0 - - In older versions, required a list of (name, address) tuples. - .. setting:: MEDIA_ROOT ``MEDIA_ROOT`` @@ -2532,8 +2519,6 @@ have it to the value provided. ``SECURE_CSP`` -------------- -.. versionadded:: 6.0 - Default: ``{}`` This setting defines the directives used by the @@ -2583,8 +2568,6 @@ This example illustrates the expected structure, using the constants defined in ``SECURE_CSP_REPORT_ONLY`` -------------------------- -.. versionadded:: 6.0 - Default: ``{}`` This setting is just like :setting:`SECURE_CSP`, but instead of enforcing the @@ -2927,8 +2910,6 @@ backend definition in :setting:`STORAGES`. ``TASKS`` --------- -.. versionadded:: 6.0 - Default:: { @@ -3296,7 +3277,6 @@ enabled if a proxy which sets this header is in use. ``URLIZE_ASSUME_HTTPS`` ----------------------- -.. versionadded:: 6.0 .. deprecated:: 6.0 Default: ``False`` diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt index aecd7f9a4419..c39adcb47f1f 100644 --- a/docs/ref/signals.txt +++ b/docs/ref/signals.txt @@ -720,8 +720,6 @@ Arguments sent with this signal: Tasks signals ============= -.. versionadded:: 6.0 - Signals sent by the :doc:`tasks ` framework. ``task_enqueued`` diff --git a/docs/ref/tasks.txt b/docs/ref/tasks.txt index 1850c91cab18..051ecd3bdc39 100644 --- a/docs/ref/tasks.txt +++ b/docs/ref/tasks.txt @@ -2,8 +2,6 @@ Tasks ===== -.. versionadded:: 6.0 - .. module:: django.tasks :synopsis: Django's built-in background Task system. diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index bd04c87ef2b0..2d22f3379562 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -809,8 +809,6 @@ tag for protection against :doc:`Cross Site Request Forgeries .. function:: csp(request) -.. versionadded:: 6.0 - If this processor is enabled, every ``RequestContext`` will contain a variable ``csp_nonce``, providing a securely generated, request-specific nonce suitable for use under a Content Security Policy. See :ref:`CSP nonce usage ` diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 6f491e2e772a..a530d4e1d079 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -458,10 +458,6 @@ Variable Description the current one ========================== =============================================== -.. versionchanged:: 6.0 - - The variable ``forloop.length`` was added. - ``for`` ... ``empty`` --------------------- @@ -992,8 +988,6 @@ output (as a string) inside a variable. This is useful if you want to use ``partial`` ----------- -.. versionadded:: 6.0 - Renders a template fragment that was defined with :ttag:`partialdef`, inserting the matching partial at this location. @@ -1023,8 +1017,6 @@ rendered three times: ``partialdef`` -------------- -.. versionadded:: 6.0 - Defines a reusable template fragment that can be rendered multiple times within the same template or accessed directly via :ref:`template loading or inclusion `. @@ -1088,10 +1080,6 @@ links, and an empty result could prevent the page from reloading as expected. ``request`` object into the template context, or provide a ``QueryDict`` instance to this tag. -.. versionchanged:: 6.0 - - A ``?`` was prepended to the query string for empty results. - Basic usage ~~~~~~~~~~~ @@ -1167,10 +1155,6 @@ If all keys are removed by setting them to ``None``, this outputs ``?``: Similarly, if all positional arguments are empty and keyword arguments do not contribute any new params, the output will also be ``?``. -.. versionchanged:: 6.0 - - Support for multiple positional mapping arguments was added. - Dynamic usage ~~~~~~~~~~~~~ diff --git a/docs/ref/templates/language.txt b/docs/ref/templates/language.txt index d80c2f6bd716..38f1f91e9038 100644 --- a/docs/ref/templates/language.txt +++ b/docs/ref/templates/language.txt @@ -481,8 +481,6 @@ wouldn't know which one of the blocks' content to use. Template partials ================= -.. versionadded:: 6.0 - Template partials define reusable template fragments within a template file. They are self-contained components that can be rendered multiple times within the same template, helping to avoid repetition and maintain consistent output. diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt index b041bbdda0fa..f9fb779ff35e 100644 --- a/docs/releases/6.1.txt +++ b/docs/releases/6.1.txt @@ -54,7 +54,7 @@ Django provides three fetch modes: Use the new method :meth:`.QuerySet.fetch_mode` to set the fetch mode for model instances fetched by the ``QuerySet``: -.. code-block:: python +.. code-block:: from django.db import models @@ -174,11 +174,6 @@ Minor features ``description`` value. This is useful when the action is available on both the admin change list and admin change form. -:mod:`django.contrib.admindocs` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* ... - :mod:`django.contrib.auth` ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -191,11 +186,6 @@ Minor features * The new :attr:`.Permission.user_perm_str` property returns the string suitable to use with :meth:`.User.has_perm`. -:mod:`django.contrib.contenttypes` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* ... - :mod:`django.contrib.gis` ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -211,11 +201,6 @@ Minor features * :class:`~django.contrib.gis.forms.widgets.OpenLayersWidget` is now based on OpenLayers 10.9.0 (previously 7.2.2). -:mod:`django.contrib.messages` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* ... - :mod:`django.contrib.postgres` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -226,11 +211,6 @@ Minor features * :class:`~django.contrib.postgres.constraints.ExclusionConstraint` now supports the Hash index type. -:mod:`django.contrib.redirects` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* ... - :mod:`django.contrib.sessions` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -238,36 +218,6 @@ Minor features boolean evaluation via :meth:`~django.contrib.sessions.backends.base.SessionBase.__bool__`. -:mod:`django.contrib.sitemaps` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* ... - -:mod:`django.contrib.sites` -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* ... - -:mod:`django.contrib.staticfiles` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* ... - -:mod:`django.contrib.syndication` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* ... - -Asynchronous views -~~~~~~~~~~~~~~~~~~ - -* ... - -Cache -~~~~~ - -* ... - CSP ~~~ @@ -287,36 +237,6 @@ CSP :func:`~django.template.context_processors.csp` context processor is configured. See :ref:`csp-nonce-config` for setup instructions. -CSRF -~~~~ - -* ... - -Decorators -~~~~~~~~~~ - -* ... - -Email -~~~~~ - -* ... - -Error Reporting -~~~~~~~~~~~~~~~ - -* ... - -File Storage -~~~~~~~~~~~~ - -* ... - -File Uploads -~~~~~~~~~~~~ - -* ... - Forms ~~~~~ @@ -343,16 +263,6 @@ Generic Views the HTTP method and body during redirects, using 307/308 status codes instead of 302/301. -Internationalization -~~~~~~~~~~~~~~~~~~~~ - -* ... - -Logging -~~~~~~~ - -* ... - Management Commands ~~~~~~~~~~~~~~~~~~~ @@ -364,11 +274,6 @@ Management Commands :data:`~django.db.models.signals.m2m_changed` signals with ``raw=True`` when loading fixtures. -Migrations -~~~~~~~~~~ - -* ... - Models ~~~~~~ @@ -416,11 +321,6 @@ Models Invalid Base64 strings now raise ``ValidationError`` instead of being silently accepted. -Pagination -~~~~~~~~~~ - -* ... - Requests and Responses ~~~~~~~~~~~~~~~~~~~~~~ @@ -431,11 +331,6 @@ Requests and Responses the :func:`~django.shortcuts.redirect` shortcut, now accept a ``max_length`` parameter to override the default maximum URL length limit. -Security -~~~~~~~~ - -* ... - Serialization ~~~~~~~~~~~~~ @@ -448,11 +343,6 @@ Serialization :exc:`~django.core.exceptions.SuspiciousOperation` when it encounters unexpected nested tags. -Signals -~~~~~~~ - -* ... - Tasks ~~~~~ @@ -463,11 +353,6 @@ Tasks * :class:`~django.tasks.Task` and :class:`~django.tasks.TaskResult` instances can now be pickled and unpickled. -Templates -~~~~~~~~~ - -* ... - Tests ~~~~~ @@ -477,22 +362,12 @@ Tests Previously, they would consume the streaming response's content, causing subsequent calls to fail. -URLs -~~~~ - -* ... - Utilities ~~~~~~~~~ * :func:`~django.utils.dateparse.parse_duration` now supports ISO 8601 time periods expressed in weeks (``PnW``). -Validators -~~~~~~~~~~ - -* ... - .. _backwards-incompatible-6.1: Backwards incompatible changes in 6.1 @@ -549,7 +424,7 @@ backends. * Under ASGI, :class:`~django.contrib.auth.middleware.RemoteUserMiddleware` no longer prefixes ``HTTP_`` when looking up custom values in ``request.META``. - For example, to send ``-H "AuthUser": ...``, the ``header`` attribute should + For example, to send ``-H "AuthUser: ..."``, the ``header`` attribute should be ``HTTP_AUTHUSER``. This restores the behavior prior to Django 5.2. (The default value of ``REMOTE_USER`` is not affected.) @@ -571,9 +446,32 @@ backends. instead of the JSON ``null`` primitive. This matches the behavior of a standalone :class:`~django.db.models.JSONField` when storing ``None`` values. +Email +----- + +* Providing ``fail_silently=True``, ``auth_user``, or ``auth_password`` to mail + sending functions (such as :func:`~django.core.mail.send_mail`) while also + providing a ``connection`` now raises a ``TypeError``. + +* The undocumented ``EmailMessage.get_connection()`` method is no longer used. + Defining it in a subclass or trying to call it now causes an error. + +* :meth:`.EmailMessage.send` no longer sets the ``connection`` property on the + ``EmailMessage``. (This behavior was never documented. The ``send()`` method + will still *use* a ``connection`` that is set on the message before sending.) + Models ------ +* The :lookup:`iexact=None ` lookup on + :class:`~django.db.models.JSONField` key transforms now matches JSON + ``null``, to match the behavior of :lookup:`exact=None ` on key + transforms. Previously, it was interpreted as an :lookup:`isnull` lookup. + +* :meth:`~.QuerySet.first` and :meth:`~.QuerySet.last` no longer order by the + primary key when a ``QuerySet``'s ordering has been forcibly cleared by + calling :meth:`~.QuerySet.order_by` with no arguments. + * SQL ``SELECT`` aliases originating from :meth:`.QuerySet.annotate` calls as well as table and ``JOIN`` aliases are now systematically quoted to prevent special character collisions. Because quoted aliases are @@ -605,40 +503,17 @@ Dropped support for MariaDB < 10.11 Upstream support for MariaDB 10.6 ends in July 2026, and MariaDB 10.7-10.10 are short-term maintenance releases. Django 6.1 supports MariaDB 10.11 and higher. -Email ------ - -* Providing ``fail_silently=True``, ``auth_user``, or ``auth_password`` to mail - sending functions (such as :func:`~django.core.mail.send_mail`) while also - providing a ``connection`` now raises a ``TypeError``. - -* The undocumented ``EmailMessage.get_connection()`` method is no longer used. - Defining it in a subclass or trying to call it now causes an error. - -* :meth:`.EmailMessage.send` no longer sets the ``connection`` property on the - ``EmailMessage``. (This behavior was never documented. The ``send()`` method - will still *use* a ``connection`` that is set on the message before sending.) - Miscellaneous ------------- +* The minimum supported version of SQLite is increased from 3.31.0 to 3.37.0. + * :class:`~django.contrib.contenttypes.fields.GenericForeignKey` now uses a separate descriptor class: the private ``GenericForeignKeyDescriptor``. * The undocumented ``django.template.library.parse_bits()`` function no longer accepts the ``takes_context`` argument. -* The minimum supported version of SQLite is increased from 3.31.0 to 3.37.0. - -* The :lookup:`iexact=None ` lookup on - :class:`~django.db.models.JSONField` key transforms now matches JSON - ``null``, to match the behavior of :lookup:`exact=None ` on key - transforms. Previously, it was interpreted as an :lookup:`isnull` lookup. - -* :meth:`~.QuerySet.first` and :meth:`~.QuerySet.last` no longer order by the - primary key when a ``QuerySet``'s ordering has been forcibly cleared by - calling :meth:`~.QuerySet.order_by` with no arguments. - * The :class:`~django.core.files.File` class now always evaluates to ``True`` in boolean contexts, rather than relying on the ``name`` attribute. The built-in subclasses ``FieldFile``, ``UploadedFile``, @@ -684,7 +559,7 @@ Email :setting:`EMAIL_HOST_USER`, :setting:`EMAIL_PORT`, :setting:`EMAIL_USE_TLS`, :setting:`EMAIL_USE_SSL`, :setting:`EMAIL_SSL_CERTFILE`, :setting:`EMAIL_SSL_KEYFILE`, and - :setting:`EMAIL_TIMEOUT` settings are deprecated. Replace them with an + :setting:`EMAIL_TIMEOUT` settings are deprecated. Replace them with a :setting:`MAILERS` configuration dictionary as described in :ref:`migrating-to-mailers`. @@ -726,8 +601,9 @@ Miscellaneous ------------- * Calling :meth:`~django.db.models.query.QuerySet.select_related` with no - arguments to select all related fields, is deprecated. Specify the related - fields to fetch instead. + arguments to select all non-nullable related fields is deprecated. Specify + the related fields to fetch instead, or use the + :attr:`~django.db.models.FETCH_PEERS` fetch mode. * Setting :attr:`.ModelAdmin.list_select_related` to ``True`` and returning ``True`` from :attr:`.ModelAdmin.get_list_select_related()` are deprecated. @@ -739,10 +615,10 @@ Miscellaneous * The use of ``None`` to represent a top-level JSON scalar ``null`` when querying :class:`~django.db.models.JSONField` is now deprecated in favor of - the new :class:`~django.db.models.JSONNull` expression. At the end - of the deprecation period, ``None`` values compile to SQL ``IS NULL`` when - used as the top-level value. :lookup:`Key and index lookups ` - are unaffected by this deprecation. + the new :class:`~django.db.models.JSONNull` expression. At the end of the + deprecation period, ``None`` values compile to SQL ``IS NULL`` when used as + the top-level value. :lookup:`Key and index lookups ` are + unaffected by this deprecation. * The ``django.db.models.fields.BLANK_CHOICE_DASH`` constant is deprecated in favor of the new constant ``django.db.models.fields.BLANK_CHOICE_LABEL``. @@ -791,8 +667,8 @@ Miscellaneous * Overriding ``ModelAdmin.get_action_choices()`` without the new ``action_location`` parameter is deprecated. -* ``django.db.transaction.savepoint()`` is deprecated in favor of - ``django.db.transaction.savepoint_create()``. +* :func:`django.db.transaction.savepoint` is deprecated in favor of + :func:`~django.db.transaction.savepoint_create`. Features removed in 6.1 ======================= diff --git a/docs/releases/6.2.txt b/docs/releases/6.2.txt new file mode 100644 index 000000000000..ba9396313d71 --- /dev/null +++ b/docs/releases/6.2.txt @@ -0,0 +1,264 @@ +============================================ +Django 6.2 release notes - UNDER DEVELOPMENT +============================================ + +*Expected April 2027* + +Welcome to Django 6.2! + +These release notes cover the :ref:`new features `, as well as +some :ref:`backwards incompatible changes ` you +should be aware of when upgrading from Django 6.1 or earlier. We've +:ref:`begun the deprecation process for some features +`. + +See the :doc:`/howto/upgrade-version` guide if you're updating an existing +project. + +Django 6.2 is designated as a :term:`long-term support release +`. It will receive security updates for at least +three years after its release. Support for the previous LTS, Django 5.2, will +end in April 2028. + +Python compatibility +==================== + +Django 6.2 supports Python 3.12, 3.13 and 3.14. We **highly recommend** and +only officially support the latest release of each series. + +.. _whats-new-6.2: + +What's new in Django 6.2 +======================== + +Minor features +-------------- + +:mod:`django.contrib.admin` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.admindocs` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.auth` +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* The default iteration count for the PBKDF2 password hasher is increased from + 1,500,000 to 1,800,000. + +:mod:`django.contrib.contenttypes` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.gis` +~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.messages` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.postgres` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.redirects` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.sessions` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.sitemaps` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.sites` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.staticfiles` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +:mod:`django.contrib.syndication` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +Asynchronous views +~~~~~~~~~~~~~~~~~~ + +* ... + +Cache +~~~~~ + +* ... + +CSP +~~~ + +* ... + +CSRF +~~~~ + +* ... + +Database backends +~~~~~~~~~~~~~~~~~ + +* ... + +Decorators +~~~~~~~~~~ + +* ... + +Email +~~~~~ + +* ... + +Error Reporting +~~~~~~~~~~~~~~~ + +* ... + +File Storage +~~~~~~~~~~~~ + +* ... + +File Uploads +~~~~~~~~~~~~ + +* ... + +Forms +~~~~~ + +* ... + +Generic Views +~~~~~~~~~~~~~ + +* ... + +Internationalization +~~~~~~~~~~~~~~~~~~~~ + +* ... + +Logging +~~~~~~~ + +* ... + +Management Commands +~~~~~~~~~~~~~~~~~~~ + +* ... + +Migrations +~~~~~~~~~~ + +* ... + +Models +~~~~~~ + +* ... + +Requests and Responses +~~~~~~~~~~~~~~~~~~~~~~ + +* ... + +Security +~~~~~~~~ + +* ... + +Serialization +~~~~~~~~~~~~~ + +* ... + +Signals +~~~~~~~ + +* ... + +Tasks +~~~~~ + +* ... + +Templates +~~~~~~~~~ + +* ... + +Tests +~~~~~ + +* ... + +URLs +~~~~ + +* ... + +Utilities +~~~~~~~~~ + +* ... + +Validators +~~~~~~~~~~ + +* ... + +.. _backwards-incompatible-6.2: + +Backwards incompatible changes in 6.2 +===================================== + +Database backend API +-------------------- + +This section describes changes that may be needed in third-party database +backends. + +* ... + +Miscellaneous +------------- + +* ... + +.. _deprecated-features-6.2: + +Features deprecated in 6.2 +========================== + +Miscellaneous +------------- + +* ... diff --git a/docs/releases/index.txt b/docs/releases/index.txt index b0ce65c7a7eb..1b715ba9884c 100644 --- a/docs/releases/index.txt +++ b/docs/releases/index.txt @@ -20,6 +20,13 @@ versions of the documentation contain the release notes for any later releases. .. _development_release_notes: +6.2 release +----------- +.. toctree:: + :maxdepth: 1 + + 6.2 + 6.1 release ----------- .. toctree:: diff --git a/docs/topics/checks.txt b/docs/topics/checks.txt index e22415e6d6ff..3c8a2d920fb6 100644 --- a/docs/topics/checks.txt +++ b/docs/topics/checks.txt @@ -197,10 +197,6 @@ method:: # ... your own checks ... return errors -.. versionchanged:: 6.0 - - In older versions, constraints didn't implement a ``check()`` method. - Writing tests ------------- diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt index 8d8fff021127..be6234f4e025 100644 --- a/docs/topics/db/aggregation.txt +++ b/docs/topics/db/aggregation.txt @@ -748,7 +748,3 @@ example above because they can detect the functional dependency. In general, ``AnyValue`` is useful when dealing with select list columns that involve non-aggregate functions or complex expressions not recognized by the database as functionally dependent on the columns in the grouping clause. - -.. versionchanged:: 6.0 - - The :class:`~django.db.models.AnyValue` aggregate was added. diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index 4070ab9066bd..cbfa3c1949e0 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -1188,10 +1188,6 @@ directly, but you can still use dictionary unpacking to use it in a query: Negative JSON array indices are not supported. -.. versionchanged:: 6.0 - - SQLite support for negative JSON array indices was added. - .. versionchanged:: 6.1 Oracle 21c+ support for negative JSON array indices was added. diff --git a/docs/topics/email.txt b/docs/topics/email.txt index 18b682768f3b..3aa52843796e 100644 --- a/docs/topics/email.txt +++ b/docs/topics/email.txt @@ -516,11 +516,6 @@ email backend API :ref:`provides an alternative :class:`EmailAttachment`, or a tuple with attributes ``(filename, content, mimetype)``. - .. versionchanged:: 6.0 - - Support for :class:`~email.message.MIMEPart` objects in the - ``attachments`` list was added. - .. deprecated:: 6.0 Support for Python's legacy :class:`~email.mime.base.MIMEBase` @@ -613,11 +608,6 @@ email backend API :ref:`provides an alternative you'll probably want to override this method to put the content you want into the Python EmailMessage object. - .. versionchanged:: 6.0 - - The ``policy`` keyword argument was added and the return type was - updated to an instance of :class:`~email.message.EmailMessage`. - .. method:: recipients() Returns a list of all the recipients of the message, whether they're @@ -685,11 +675,6 @@ email backend API :ref:`provides an alternative Python's :meth:`email.contentmanager.set_content` documentation describes the supported arguments for ``MIMEPart.set_content()``. - .. versionchanged:: 6.0 - - Support for :class:`~email.message.MIMEPart` attachments was - added. - .. deprecated:: 6.0 Support for :class:`email.mime.base.MIMEBase` attachments is @@ -847,12 +832,6 @@ to "/contact/thanks/" when it's done:: # to get proper validation errors. return HttpResponse("Make sure all fields are entered and valid.") - -.. versionchanged:: 6.0 - - Older versions raised ``django.core.mail.BadHeaderError`` for some - invalid headers. This has been replaced with :exc:`!ValueError`. - .. _Header injection: http://www.nyphp.org/phundamentals/8_Preventing-Email-Header-Injection.html .. _topics-sending-multiple-emails: diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt index f68f512cdd35..285fb192cd52 100644 --- a/docs/topics/migrations.txt +++ b/docs/topics/migrations.txt @@ -756,10 +756,6 @@ You can then transition the squashed migration to a normal migration by: future, you should remove references to it from Django’s migrations table with the :option:`migrate --prune` option. -.. versionchanged:: 6.0 - - Support for squashing squashed migrations was added. - .. _migration-serializing: Serializing values @@ -807,10 +803,6 @@ Django can serialize the following: - Anything with a custom ``deconstruct()`` method (:ref:`see below `) -.. versionchanged:: 6.0 - - Serialization support for :class:`zoneinfo.ZoneInfo` instances was added. - Django cannot serialize: - Nested classes diff --git a/docs/topics/security.txt b/docs/topics/security.txt index ea3021c26d6c..3a3d79b8a8fb 100644 --- a/docs/topics/security.txt +++ b/docs/topics/security.txt @@ -303,8 +303,6 @@ Form Submissions Content Security Policy ======================= -.. versionadded:: 6.0 - Content Security Policy (CSP) is a browser security mechanism that helps protect web applications against attacks such as cross-site scripting (XSS) and other content injection attacks. diff --git a/docs/topics/tasks.txt b/docs/topics/tasks.txt index d3bc54f6b4f2..c21ad7e84efc 100644 --- a/docs/topics/tasks.txt +++ b/docs/topics/tasks.txt @@ -2,10 +2,6 @@ Django's Tasks framework ======================== -.. versionadded:: 6.0 - - For older Django versions, the :pypi:`django-tasks` backport is available. - For a web application, there's often more than just turning HTTP requests into HTTP responses. For some functionality, it may be beneficial to run code outside the request-response cycle. diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt index 4ddb59d7c459..1d9e39226813 100644 --- a/docs/topics/templates.txt +++ b/docs/topics/templates.txt @@ -327,12 +327,6 @@ The ``django.template.loader`` module defines two functions to load templates. See :ref:`template-partials` for more information about defining and using template fragments. - .. versionchanged:: 6.0 - - Support for loading template partials when using the - :class:`~django.template.backends.django.DjangoTemplates` backend was - added. - .. function:: select_template(template_name_list, using=None) ``select_template()`` is just like ``get_template()``, except it takes a diff --git a/tests/auth_tests/test_hashers.py b/tests/auth_tests/test_hashers.py index 9fb7e3f95d6c..8815bb02d92c 100644 --- a/tests/auth_tests/test_hashers.py +++ b/tests/auth_tests/test_hashers.py @@ -85,8 +85,8 @@ def test_pbkdf2(self): encoded = make_password("lètmein", "seasalt", "pbkdf2_sha256") self.assertEqual( encoded, - "pbkdf2_sha256$1500000$" - "seasalt$P4UiMPVduVWIL/oS1GzH+IofsccjJNM5hUTikBvi5to=", + "pbkdf2_sha256$1800000$" + "seasalt$sXv9FzN4gEo6/P8G5H1jvir9BIb5e5EkXoVGyjOniNE=", ) self.assertTrue(is_password_usable(encoded)) self.assertTrue(check_password("lètmein", encoded)) @@ -279,8 +279,8 @@ def test_low_level_pbkdf2(self): encoded = hasher.encode("lètmein", "seasalt2") self.assertEqual( encoded, - "pbkdf2_sha256$1500000$" - "seasalt2$xWKIh704updzhxL+vMfPbhVsHljK62FyE988AtcoHU4=", + "pbkdf2_sha256$1800000$" + "seasalt2$swjWuQn/bYIeQWF1JQRMdMdckgYo6ZXtwyjAMt8Nxdg=", ) self.assertTrue(hasher.verify("lètmein", encoded)) @@ -288,7 +288,7 @@ def test_low_level_pbkdf2_sha1(self): hasher = PBKDF2SHA1PasswordHasher() encoded = hasher.encode("lètmein", "seasalt2") self.assertEqual( - encoded, "pbkdf2_sha1$1500000$seasalt2$ep4Ou2hnt2mlvMRsIjUln0Z5MYY=" + encoded, "pbkdf2_sha1$1800000$seasalt2$MEx5Z/KZ384PO7zdMHxMvXH2k3g=" ) self.assertTrue(hasher.verify("lètmein", encoded))