mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Removed versionadded/changed annotations for 1.11.
This commit is contained in:
parent
2bd207ada0
commit
5446b72003
53 changed files with 0 additions and 489 deletions
|
@ -509,10 +509,6 @@ different user model.
|
|||
from myapp import some_module
|
||||
some_module.UserModel = get_user_model()
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
The ability to call ``get_user_model()`` at import time was added.
|
||||
|
||||
.. _specifying-custom-user-model:
|
||||
|
||||
Specifying a custom user model
|
||||
|
@ -573,8 +569,6 @@ password resets. You must then provide some key implementation details:
|
|||
|
||||
.. attribute:: EMAIL_FIELD
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
A string describing the name of the email field on the ``User`` model.
|
||||
This value is returned by
|
||||
:meth:`~models.AbstractBaseUser.get_email_field_name`.
|
||||
|
@ -663,8 +657,6 @@ The following attributes and methods are available on any subclass of
|
|||
|
||||
.. classmethod:: get_email_field_name()
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Returns the name of the email field specified by the
|
||||
:attr:`~models.CustomUser.EMAIL_FIELD` attribute. Defaults to
|
||||
``'email'`` if ``EMAIL_FIELD`` isn't specified.
|
||||
|
@ -739,8 +731,6 @@ The following attributes and methods are available on any subclass of
|
|||
|
||||
.. method:: clean()
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Normalizes the email by calling
|
||||
:meth:`.BaseUserManager.normalize_email`. If you override this method,
|
||||
be sure to call ``super()`` to retain the normalization.
|
||||
|
|
|
@ -136,10 +136,6 @@ Authenticating users
|
|||
``request`` is an optional :class:`~django.http.HttpRequest` which is
|
||||
passed on the ``authenticate()`` method of the authentication backends.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
The optional ``request`` argument was added.
|
||||
|
||||
.. note::
|
||||
|
||||
This is a low level way to authenticate a set of credentials; for
|
||||
|
@ -860,10 +856,6 @@ function.
|
|||
else:
|
||||
...
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Rotating of the session key was added.
|
||||
|
||||
.. note::
|
||||
|
||||
Since
|
||||
|
@ -947,8 +939,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. class:: LoginView
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
**URL name:** ``login``
|
||||
|
||||
See :doc:`the URL documentation </topics/http/urls>` for details on using
|
||||
|
@ -1085,8 +1075,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. class:: LogoutView
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Logs a user out.
|
||||
|
||||
**URL name:** ``logout``
|
||||
|
@ -1139,8 +1127,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. class:: PasswordChangeView
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
**URL name:** ``password_change``
|
||||
|
||||
Allows a user to change their password.
|
||||
|
@ -1168,8 +1154,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. class:: PasswordChangeDoneView
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
**URL name:** ``password_change_done``
|
||||
|
||||
The page shown after a user has changed their password.
|
||||
|
@ -1185,8 +1169,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. class:: PasswordResetView
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
**URL name:** ``password_reset``
|
||||
|
||||
Allows a user to reset their password by generating a one-time use link
|
||||
|
@ -1285,8 +1267,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. class:: PasswordResetDoneView
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
**URL name:** ``password_reset_done``
|
||||
|
||||
The page shown after a user has been emailed a link to reset their
|
||||
|
@ -1310,8 +1290,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. class:: PasswordResetConfirmView
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
**URL name:** ``password_reset_confirm``
|
||||
|
||||
Presents a form for entering a new password.
|
||||
|
@ -1360,8 +1338,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. class:: PasswordResetCompleteView
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
**URL name:** ``password_reset_complete``
|
||||
|
||||
Presents a view which informs the user that the password has been
|
||||
|
|
|
@ -168,11 +168,6 @@ permanent storage -- they're all intended to be solutions for caching, not
|
|||
storage -- but we point this out here because memory-based caching is
|
||||
particularly temporary.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
The :setting:`LOCATION <CACHES-LOCATION>` setting now supports defining
|
||||
multiple servers as a comma-delimited string.
|
||||
|
||||
.. _database-caching:
|
||||
|
||||
Database caching
|
||||
|
@ -528,10 +523,6 @@ Additionally, ``UpdateCacheMiddleware`` automatically sets a few headers in each
|
|||
* Sets the ``Cache-Control`` header to give a max age for the page --
|
||||
again, from the :setting:`CACHE_MIDDLEWARE_SECONDS` setting.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
In older versions, the ``Last-Modified`` header was also set.
|
||||
|
||||
See :doc:`/topics/http/middleware` for more on middleware.
|
||||
|
||||
If a view sets its own cache expiry time (i.e. it has a ``max-age`` section in
|
||||
|
|
|
@ -70,14 +70,6 @@ The decorator sets the ``ETag`` and ``Last-Modified`` headers on the response
|
|||
if they are not already set by the view and if the request's method is safe
|
||||
(``GET`` or ``HEAD``).
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
In older versions, the return value from ``etag_func()`` was interpreted as
|
||||
the unquoted part of the ETag. That prevented the use of weak ETags, which
|
||||
have the format ``W/"<string>"``. The return value is now expected to be
|
||||
an ETag as defined by the specification (including the quotes), although
|
||||
the unquoted format is also accepted for backwards compatibility.
|
||||
|
||||
Using this feature usefully is probably best explained with an example.
|
||||
Suppose you have this pair of models, representing a simple blog system::
|
||||
|
||||
|
|
|
@ -660,10 +660,6 @@ The ``F()`` objects support bitwise operations by ``.bitand()``, ``.bitor()``,
|
|||
|
||||
>>> F('somefield').bitand(16)
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Support for ``.bitrightshift()`` and ``.bitleftshift()`` was added.
|
||||
|
||||
The ``pk`` lookup shortcut
|
||||
--------------------------
|
||||
|
||||
|
|
|
@ -367,11 +367,6 @@ The class has the following methods:
|
|||
For MIME types starting with ``text/``, binary data is handled as in
|
||||
``attach()``.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Added the fallback to MIME type ``application/octet-stream`` when binary
|
||||
data for a ``text/*`` attachment cannot be decoded.
|
||||
|
||||
Sending alternative content types
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -29,10 +29,6 @@ Time zone support is disabled by default. To enable it, set :setting:`USE_TZ =
|
|||
True <USE_TZ>` in your settings file. Time zone support uses pytz_, which is
|
||||
installed when you install Django.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Older versions don't require ``pytz`` or install it automatically.
|
||||
|
||||
.. note::
|
||||
|
||||
The default :file:`settings.py` file created by :djadmin:`django-admin
|
||||
|
|
|
@ -670,10 +670,6 @@ Django can serialize the following:
|
|||
- Any class reference (must be in module's top-level scope)
|
||||
- Anything with a custom ``deconstruct()`` method (:ref:`see below <custom-deconstruct-method>`)
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Serialization support for ``uuid.UUID`` was added.
|
||||
|
||||
Django cannot serialize:
|
||||
|
||||
- Nested classes
|
||||
|
|
|
@ -271,10 +271,6 @@ function::
|
|||
|
||||
serialize('json', SomeModel.objects.all(), cls=LazyEncoder)
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
The ability to use a custom encoder using ``cls=...`` was added.
|
||||
|
||||
Also note that GeoDjango provides a :doc:`customized GeoJSON serializer
|
||||
</ref/contrib/gis/serializers>`.
|
||||
|
||||
|
@ -304,10 +300,6 @@ The JSON serializer uses ``DjangoJSONEncoder`` for encoding. A subclass of
|
|||
:class:`~decimal.Decimal`, ``Promise`` (``django.utils.functional.lazy()`` objects), :class:`~uuid.UUID`
|
||||
A string representation of the object.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Support for :class:`~datetime.timedelta` was added.
|
||||
|
||||
.. _ecma-262: http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15
|
||||
|
||||
YAML
|
||||
|
|
|
@ -441,10 +441,6 @@ adds defaults that differ from Jinja2's for a few options:
|
|||
Unless all of these conditions are met, passing a function to the template is
|
||||
simpler and more in line with the design of Jinja2.
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
The ``'context_processors'`` option was added.
|
||||
|
||||
The default configuration is purposefully kept to a minimum. If a template is
|
||||
rendered with a request (e.g. when using :py:func:`~django.shortcuts.render`),
|
||||
the ``Jinja2`` backend adds the globals ``request``, ``csrf_input``, and
|
||||
|
|
|
@ -117,11 +117,6 @@ Disabling :setting:`ALLOWED_HOSTS` checking (``ALLOWED_HOSTS = ['*']``) when
|
|||
running tests prevents the test client from raising a helpful error message if
|
||||
you follow a redirect to an external URL.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Older versions didn't validate ``ALLOWED_HOSTS`` while testing so these
|
||||
techniques weren't necessary.
|
||||
|
||||
.. _topics-testing-advanced-multidb:
|
||||
|
||||
Tests and multiple databases
|
||||
|
@ -410,10 +405,6 @@ testing behavior. This behavior involves:
|
|||
|
||||
#. Performing global post-test teardown.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Running the system checks was added.
|
||||
|
||||
If you define your own test runner class and point :setting:`TEST_RUNNER` at
|
||||
that class, Django will execute your test runner whenever you run
|
||||
``./manage.py test``. In this way, it is possible to use any test framework
|
||||
|
@ -482,10 +473,6 @@ execute and tear down the test suite.
|
|||
custom arguments by calling ``parser.add_argument()`` inside the method, so
|
||||
that the :djadmin:`test` command will be able to use those arguments.
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
The ``debug_mode`` keyword argument was added.
|
||||
|
||||
Attributes
|
||||
~~~~~~~~~~
|
||||
|
||||
|
@ -574,8 +561,6 @@ Methods
|
|||
|
||||
.. method:: DiscoverRunner.run_checks()
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Runs the :doc:`system checks </topics/checks>`.
|
||||
|
||||
.. method:: DiscoverRunner.run_suite(suite, **kwargs)
|
||||
|
@ -586,8 +571,6 @@ Methods
|
|||
|
||||
.. method:: DiscoverRunner.get_test_runner_kwargs()
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Returns the keyword arguments to instantiate the
|
||||
``DiscoverRunner.test_runner`` with.
|
||||
|
||||
|
@ -626,10 +609,6 @@ utility methods in the ``django.test.utils`` module.
|
|||
If ``debug`` isn't ``None``, the :setting:`DEBUG` setting is updated to its
|
||||
value.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
The ``debug`` argument was added.
|
||||
|
||||
.. function:: teardown_test_environment()
|
||||
|
||||
Performs global post-test teardown, such as removing instrumentation from
|
||||
|
@ -637,8 +616,6 @@ utility methods in the ``django.test.utils`` module.
|
|||
|
||||
.. function:: setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, parallel=0, **kwargs)
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Creates the test databases.
|
||||
|
||||
Returns a data structure that provides enough detail to undo the changes
|
||||
|
@ -647,8 +624,6 @@ utility methods in the ``django.test.utils`` module.
|
|||
|
||||
.. function:: teardown_databases(old_config, parallel=0, keepdb=False)
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Destroys the test databases, restoring pre-test conditions.
|
||||
|
||||
``old_config`` is a data structure defining the changes in the database
|
||||
|
|
|
@ -853,13 +853,6 @@ The live server listens on ``localhost`` and binds to port 0 which uses a free
|
|||
port assigned by the operating system. The server's URL can be accessed with
|
||||
``self.live_server_url`` during the tests.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
In older versions, Django tried a predefined port range which could be
|
||||
customized in various ways including the ``DJANGO_LIVE_TEST_SERVER_ADDRESS``
|
||||
environment variable. This is removed in favor of the simpler "bind to port
|
||||
0" technique.
|
||||
|
||||
To demonstrate how to use ``LiveServerTestCase``, let's write a simple Selenium
|
||||
test. First of all, you need to install the `selenium package`_ into your
|
||||
Python path:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue