diff --git a/docs/howto/custom-lookups.txt b/docs/howto/custom-lookups.txt index 1e73d329e7..7504997ed5 100644 --- a/docs/howto/custom-lookups.txt +++ b/docs/howto/custom-lookups.txt @@ -148,11 +148,6 @@ And on databases that support distinct on fields (such as PostgreSQL), SELECT ... DISTINCT ON ABS("experiments"."change") -.. versionchanged:: 2.1 - - Ordering and distinct support as described in the last two paragraphs was - added. - When looking for which lookups are allowable after the ``Transform`` has been applied, Django uses the ``output_field`` attribute. We didn't need to specify this here as it didn't change, but supposing we were applying ``AbsoluteValue`` diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt index d547bd97e2..aeee00016a 100644 --- a/docs/howto/custom-management-commands.txt +++ b/docs/howto/custom-management-commands.txt @@ -144,12 +144,6 @@ decorator on your :meth:`~BaseCommand.handle` method:: Since translation deactivation requires access to configured settings, the decorator can't be used for commands that work without configured settings. -.. versionchanged:: 2.1 - - The ``@no_translations`` decorator is new. In older versions, translations - are deactivated before running a command unless the command's - ``leave_locale_alone`` attribute (now removed) is set to ``True``. - Testing ======= diff --git a/docs/ref/contrib/admin/actions.txt b/docs/ref/contrib/admin/actions.txt index 015427054a..f0c8be7728 100644 --- a/docs/ref/contrib/admin/actions.txt +++ b/docs/ref/contrib/admin/actions.txt @@ -361,8 +361,6 @@ Conditionally enabling or disabling actions Setting permissions for actions ------------------------------- -.. versionadded:: 2.1 - Actions may limit their availability to users with specific permissions by setting an ``allowed_permissions`` attribute on the action function:: diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index c163dc9f2e..75ad811e69 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -157,8 +157,6 @@ application and imports it. .. attribute:: default_site - .. versionadded:: 2.1 - A dotted import path to the default admin site's class or to a callable that returns a site instance. Defaults to ``'django.contrib.admin.sites.AdminSite'``. See @@ -754,10 +752,6 @@ subclass:: return self.first_name + ' ' + self.last_name full_name.admin_order_field = Concat('first_name', Value(' '), 'last_name') - .. versionadded:: 2.1 - - Support for expressions in ``admin_order_field`` was added. - * Elements of ``list_display`` can also be properties. Please note however, that due to the way properties work in Python, setting ``short_description`` on a property is only possible when using the @@ -1279,10 +1273,6 @@ subclass:: searching with :lookup:`exact` only works with a single search word since two or more words can't all be an exact match unless all words are the same. - .. versionadded:: 2.1 - - The ability to specify a field lookup was added. - Some (older) shortcuts for specifying a field lookup are also available. You can prefix a field in ``search_fields`` with the following characters and it's equivalent to adding ``__`` to the field: @@ -1313,8 +1303,6 @@ subclass:: .. attribute:: ModelAdmin.sortable_by - .. versionadded:: 2.1 - By default, the change list page allows sorting by all model fields (and callables that have the ``admin_order_field`` property) specified in :attr:`list_display`. @@ -1433,8 +1421,6 @@ templates used by the :class:`ModelAdmin` views: .. method:: ModelAdmin.delete_queryset(request, queryset) - .. versionadded:: 2.1 - The ``delete_queryset()`` method is given the ``HttpRequest`` and a ``QuerySet`` of objects to be deleted. Override this method to customize the deletion process for the "delete selected objects" :doc:`action @@ -1595,8 +1581,6 @@ templates used by the :class:`ModelAdmin` views: .. method:: ModelAdmin.get_sortable_by(request) - .. versionadded:: 2.1 - The ``get_sortable_by()`` method is passed the ``HttpRequest`` and is expected to return a collection (e.g. ``list``, ``tuple``, or ``set``) of field names that will be sortable in the change list page. @@ -1884,8 +1868,6 @@ templates used by the :class:`ModelAdmin` views: .. method:: ModelAdmin.has_view_permission(request, obj=None) - .. versionadded:: 2.1 - Should return ``True`` if viewing ``obj`` is permitted, ``False`` otherwise. If obj is ``None``, should return ``True`` or ``False`` to indicate whether viewing of objects of this type is permitted in general (e.g., ``False`` @@ -2009,8 +1991,6 @@ templates used by the :class:`ModelAdmin` views: .. method:: ModelAdmin.get_deleted_objects(objs, request) - .. versionadded:: 2.1 - A hook for customizing the deletion process of the :meth:`delete_view` and the "delete selected" :doc:`action `. @@ -2128,10 +2108,6 @@ To avoid conflicts with user-supplied scripts or libraries, Django's jQuery in your own admin JavaScript without including a second copy, you can use the ``django.jQuery`` object on changelist and add/edit views. -.. versionchanged:: 2.1 - - jQuery was upgraded from 2.2.3 to 3.3.1. - The :class:`ModelAdmin` class requires jQuery by default, so there is no need to add jQuery to your ``ModelAdmin``’s list of media resources unless you have a specific need. For example, if you require the jQuery library to be in the @@ -2411,12 +2387,6 @@ The ``InlineModelAdmin`` class adds or customizes: otherwise. ``obj`` is the parent object being edited or ``None`` when adding a new parent. - .. versionchanged:: 2.1 - - The ``obj`` argument was added. During the deprecation period, it may - also be ``None`` if third-party calls to ``has_add_permission()`` don't - provide it. - .. method:: InlineModelAdmin.has_change_permission(request, obj=None) Should return ``True`` if editing an inline object is permitted, ``False`` @@ -2726,13 +2696,6 @@ app or per model. The following can: * ``search_form.html`` * ``submit_line.html`` -.. versionchanged:: 2.1 - - The ability to override the ``actions.html``, ``change_form_object_tools.html``, - ``change_list_object_tools.html``, ``change_list_results.html``, - ``date_hierarchy.html``, ``pagination.html``, ``prepopulated_fields_js.html``, - ``search_form.html``, and ``submit_line.html`` templates was added. - For those templates that cannot be overridden in this way, you may still override them for your entire project. Just place the new version in your ``templates/admin`` directory. This is particularly useful to create custom 404 @@ -2967,8 +2930,6 @@ put ``'django.contrib.admin.apps.SimpleAdminConfig'`` instead of Overriding the default admin site --------------------------------- -.. versionadded:: 2.1 - You can override the default ``django.contrib.admin.site`` by setting the :attr:`~.SimpleAdminConfig.default_site` attribute of a custom ``AppConfig`` to the dotted import path of either a ``AdminSite`` subclass or a callable that diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt index efbffa62c2..9376ea6fcb 100644 --- a/docs/ref/contrib/auth.txt +++ b/docs/ref/contrib/auth.txt @@ -210,14 +210,6 @@ Methods :meth:`~django.contrib.auth.models.User.set_unusable_password()` has been called for this user. - .. versionchanged:: 2.1 - - In older versions, this also returns ``False`` if the password is - ``None`` or an empty string, or if the password uses a hasher - that's not in the :setting:`PASSWORD_HASHERS` setting. That - behavior is considered a bug as it prevents users with such - passwords from requesting a password reset. - .. method:: get_group_permissions(obj=None) Returns a set of permission strings that the user has, through their diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt index 60476902bb..453c1385d5 100644 --- a/docs/ref/contrib/gis/functions.txt +++ b/docs/ref/contrib/gis/functions.txt @@ -283,8 +283,6 @@ representing the bounding box of the geometry. .. class:: ForcePolygonCW(expression, **extra) -.. versionadded:: 2.1 - *Availability*: `PostGIS `__, SpatiaLite diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt index c19a5ab05c..068fe7d006 100644 --- a/docs/ref/contrib/gis/geos.txt +++ b/docs/ref/contrib/gis/geos.txt @@ -487,8 +487,6 @@ Topological Methods .. method:: GEOSGeometry.buffer_with_style(width, quadsegs=8, end_cap_style=1, join_style=1, mitre_limit=5.0) - .. versionadded:: 2.1 - Same as :meth:`buffer`, but allows customizing the style of the buffer. * ``end_cap_style`` can be round (``1``), flat (``2``), or square (``3``). diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt index 01d47af55b..11fcec664f 100644 --- a/docs/ref/contrib/postgres/fields.txt +++ b/docs/ref/contrib/postgres/fields.txt @@ -577,12 +577,6 @@ To query for missing keys, use the ``isnull`` lookup:: >>> Dog.objects.filter(data__owner__isnull=True) ]> -.. versionchanged:: 2.1 - - In older versions, using ``None`` as a lookup value matches objects that - don't have the key rather than objects that have the key with a ``None`` - value. - .. warning:: Since any string could be a key in a JSON object, any lookup other than diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 22a5c4dbac..5a4ce33c56 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -432,8 +432,6 @@ Only support for PostgreSQL is implemented. .. django-admin-option:: --include-views -.. versionadded:: 2.1 - If this option is provided, models are also created for database views. ``loaddata`` diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt index c82a7cd7b7..c7f7b5d981 100644 --- a/docs/ref/models/database-functions.txt +++ b/docs/ref/models/database-functions.txt @@ -535,8 +535,6 @@ Usage example:: .. class:: TruncWeek(expression, output_field=None, tzinfo=None, **extra) - .. versionadded:: 2.1 - Truncates to midnight on the Monday of the week. .. attribute:: kind = 'week' @@ -1172,8 +1170,6 @@ Text functions .. class:: Chr(expression, **extra) -.. versionadded:: 2.1 - Accepts a numeric field or expression and returns the text representation of the expression as a single character. It works the same as Python's :func:`chr` function. @@ -1225,8 +1221,6 @@ Usage example:: .. class:: Left(expression, length, **extra) -.. versionadded:: 2.1 - Returns the first ``length`` characters of the given text field or expression. Usage example:: @@ -1287,8 +1281,6 @@ Usage example:: .. class:: LPad(expression, length, fill_text=Value(' '), **extra) -.. versionadded:: 2.1 - Returns the value of the given text field or expression padded on the left side with ``fill_text`` so that the resulting value is ``length`` characters long. The default ``fill_text`` is a space. @@ -1308,8 +1300,6 @@ Usage example:: .. class:: LTrim(expression, **extra) -.. versionadded:: 2.1 - Similar to :class:`~django.db.models.functions.Trim`, but removes only leading spaces. @@ -1318,8 +1308,6 @@ spaces. .. class:: Ord(expression, **extra) -.. versionadded:: 2.1 - Accepts a single text field or expression and returns the Unicode code point value for the first character of that expression. It works similar to Python's :func:`ord` function, but an exception isn't raised if the expression is more @@ -1341,8 +1329,6 @@ Usage example:: .. class:: Repeat(expression, number, **extra) -.. versionadded:: 2.1 - Returns the value of the given text field or expression repeated ``number`` times. @@ -1360,8 +1346,6 @@ Usage example:: .. class:: Replace(expression, text, replacement=Value(''), **extra) -.. versionadded:: 2.1 - Replaces all occurrences of ``text`` with ``replacement`` in ``expression``. The default replacement text is the empty string. The arguments to the function are case-sensitive. @@ -1403,8 +1387,6 @@ Usage example:: .. class:: Right(expression, length, **extra) -.. versionadded:: 2.1 - Returns the last ``length`` characters of the given text field or expression. Usage example:: @@ -1420,8 +1402,6 @@ Usage example:: .. class:: RPad(expression, length, fill_text=Value(' '), **extra) -.. versionadded:: 2.1 - Similar to :class:`~django.db.models.functions.LPad`, but pads on the right side. @@ -1430,8 +1410,6 @@ side. .. class:: RTrim(expression, **extra) -.. versionadded:: 2.1 - Similar to :class:`~django.db.models.functions.Trim`, but removes only trailing spaces. @@ -1491,8 +1469,6 @@ Usage example:: .. class:: Trim(expression, **extra) -.. versionadded:: 2.1 - Returns the value of the given text field or expression with leading and trailing spaces removed. diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt index 2413952228..bfd5ddea2c 100644 --- a/docs/ref/models/expressions.txt +++ b/docs/ref/models/expressions.txt @@ -17,10 +17,6 @@ Django supports negation, addition, subtraction, multiplication, division, modulo arithmetic, and the power operator on query expressions, using Python constants, variables, and even other expressions. -.. versionchanged:: 2.1 - - Support for negation was added. - Some examples ============= diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 2d95233351..1b572d8076 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -422,10 +422,6 @@ A field to store raw binary data. It can be assigned :class:`bytes`, By default, ``BinaryField`` sets :attr:`~Field.editable` to ``False``, in which case it can't be included in a :class:`~django.forms.ModelForm`. -.. versionchanged:: 2.1 - - Older versions don't allow setting ``editable`` to ``True``. - ``BinaryField`` has one extra optional argument: .. attribute:: BinaryField.max_length @@ -453,12 +449,6 @@ or :class:`~django.forms.NullBooleanSelect` if :attr:`null=True `. The default value of ``BooleanField`` is ``None`` when :attr:`Field.default` isn't defined. -.. versionchanged:: 2.1 - - In older versions, this field doesn't permit ``null=True``, so you have to - use :class:`NullBooleanField` instead. Using the latter is now discouraged - as it's likely to be deprecated in a future version of Django. - ``CharField`` ------------- diff --git a/docs/ref/models/indexes.txt b/docs/ref/models/indexes.txt index 1b27c17193..e894aa8d9a 100644 --- a/docs/ref/models/indexes.txt +++ b/docs/ref/models/indexes.txt @@ -40,10 +40,6 @@ For example ``Index(fields=['headline', '-pub_date'])`` would create SQL with ``(headline, pub_date DESC)``. Index ordering isn't supported on MySQL. In that case, a descending index is created as a normal index. -.. versionchanged:: 2.1 - - Older versions don't accept a tuple. - ``name`` -------- diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index e06a099a61..d28cd3fe16 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -325,10 +325,6 @@ Django quotes column and table names behind the scenes. before the model is created by :djadmin:`migrate` in order to prevent any omitted permissions from being created. - .. versionchanged:: 2.1 - - The ``view`` permission was added. - ``proxy`` --------- diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 3ddd516eaf..4c161200da 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -544,10 +544,6 @@ ordering. For example:: >>> Blog.objects.values('name__lower') -.. versionchanged:: 2.1 - - Support for lookups was added. - An aggregate within a ``values()`` clause is applied before other arguments within the same ``values()`` clause. If you need to group by another value, add it to an earlier ``values()`` clause instead. For example:: @@ -752,10 +748,6 @@ Examples:: >>> Entry.objects.filter(headline__contains='Lennon').dates('pub_date', 'day') [datetime.date(2005, 3, 20)] -.. versionchanged:: 2.1 - - "week" support was added. - ``datetimes()`` ~~~~~~~~~~~~~~~ @@ -781,10 +773,6 @@ object. If it's ``None``, Django uses the :ref:`current time zone `. It has no effect when :setting:`USE_TZ` is ``False``. -.. versionchanged:: 2.1 - - "week" support was added. - .. _database-time-zone-definitions: .. note:: @@ -2561,8 +2549,6 @@ with a copy of the ``QuerySet``’s methods. See ``explain()`` ~~~~~~~~~~~~~ -.. versionadded:: 2.1 - .. method:: explain(format=None, **options) Returns a string of the ``QuerySet``’s execution plan, which details how the diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index 84aa72da20..b04d3b9d17 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -318,8 +318,6 @@ Methods .. method:: HttpRequest.get_full_path_info() - .. versionadded:: 2.1 - Like :meth:`get_full_path`, but uses :attr:`path_info` instead of :attr:`path`. @@ -815,10 +813,6 @@ Methods isn't supported by all browsers, so it's not a replacement for Django's CSRF protection, but rather a defense in depth measure. - .. versionchanged:: 2.1 - - The ``samesite`` argument was added. - .. _HTTPOnly: https://www.owasp.org/index.php/HTTPOnly .. _SameSite: https://www.owasp.org/index.php/SameSite @@ -1107,12 +1101,6 @@ Attributes headers are automatically set when they can be guessed from contents of ``open_file``. - .. versionadded:: 2.1 - - The ``as_attachment`` and ``filename`` keywords argument were added. - Also, ``FileResponse`` sets the ``Content`` headers if it can guess - them. - .. _wsgi.file_wrapper: https://www.python.org/dev/peps/pep-3333/#optional-platform-specific-file-handling ``FileResponse`` accepts any file-like object with binary content, for example @@ -1128,8 +1116,6 @@ Methods .. method:: FileResponse.set_headers(open_file) - .. versionadded:: 2.1 - This method is automatically called during the response initialization and set various headers (``Content-Length``, ``Content-Type``, and ``Content-Disposition``) depending on ``open_file``. diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 5ebc26d868..0aefd6bce5 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -371,8 +371,6 @@ its own CSRF cookie. ``CSRF_COOKIE_SAMESITE`` ------------------------ -.. versionadded:: 2.1 - Default: ``'Lax'`` The value of the `SameSite`_ flag on the CSRF cookie. This flag prevents the @@ -3050,8 +3048,6 @@ its own session cookie. ``SESSION_COOKIE_SAMESITE`` --------------------------- -.. versionadded:: 2.1 - Default: ``'Lax'`` The value of the `SameSite`_ flag on the session cookie. This flag prevents the diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 6332f28c20..7aed6ee6fe 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1793,8 +1793,6 @@ If ``value`` is the list ``['a', 'b', 'c']``, the output will be the string ``json_script`` --------------- -.. versionadded:: 2.1 - Safely outputs a Python object as JSON, wrapped in a ``