Corrected signatures of some functions in docs.

This commit is contained in:
Mariusz Felisiak 2022-01-10 12:16:15 +01:00
parent b0ccf74549
commit 178109c173
4 changed files with 9 additions and 9 deletions

View File

@ -654,7 +654,7 @@ Here's what each of the built-in processors does:
``django.contrib.auth.context_processors.auth`` ``django.contrib.auth.context_processors.auth``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. function:: auth .. function:: auth(request)
If this processor is enabled, every ``RequestContext`` will contain these If this processor is enabled, every ``RequestContext`` will contain these
variables: variables:
@ -672,7 +672,7 @@ variables:
``django.template.context_processors.debug`` ``django.template.context_processors.debug``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. function:: debug .. function:: debug(request)
If this processor is enabled, every ``RequestContext`` will contain these two If this processor is enabled, every ``RequestContext`` will contain these two
variables -- but only if your :setting:`DEBUG` setting is set to ``True`` and variables -- but only if your :setting:`DEBUG` setting is set to ``True`` and
@ -689,7 +689,7 @@ the request's IP address (``request.META['REMOTE_ADDR']``) is in the
``django.template.context_processors.i18n`` ``django.template.context_processors.i18n``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. function:: i18n .. function:: i18n(request)
If this processor is enabled, every ``RequestContext`` will contain these If this processor is enabled, every ``RequestContext`` will contain these
variables: variables:
@ -713,7 +713,7 @@ If this processor is enabled, every ``RequestContext`` will contain a variable
``django.template.context_processors.static`` ``django.template.context_processors.static``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. function:: static .. function:: static(request)
If this processor is enabled, every ``RequestContext`` will contain a variable If this processor is enabled, every ``RequestContext`` will contain a variable
``STATIC_URL``, providing the value of the :setting:`STATIC_URL` setting. ``STATIC_URL``, providing the value of the :setting:`STATIC_URL` setting.
@ -734,7 +734,7 @@ If this processor is enabled, every ``RequestContext`` will contain a variable
``django.template.context_processors.tz`` ``django.template.context_processors.tz``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. function:: tz .. function:: tz(request)
If this processor is enabled, every ``RequestContext`` will contain a variable If this processor is enabled, every ``RequestContext`` will contain a variable
``TIME_ZONE``, providing the name of the currently active time zone. ``TIME_ZONE``, providing the name of the currently active time zone.

View File

@ -647,7 +647,7 @@ __ `Controlling cache: Using other headers`_
The per-view cache The per-view cache
================== ==================
.. function:: django.views.decorators.cache.cache_page .. function:: django.views.decorators.cache.cache_page(timeout, *, cache=None, key_prefix=None)
A more granular way to use the caching framework is by caching the output of A more granular way to use the caching framework is by caching the output of
individual views. ``django.views.decorators.cache`` defines a ``cache_page`` individual views. ``django.views.decorators.cache`` defines a ``cache_page``

View File

@ -515,7 +515,7 @@ And then later::
Localized names of languages Localized names of languages
---------------------------- ----------------------------
.. function:: get_language_info .. function:: get_language_info(lang_code)
The ``get_language_info()`` function provides detailed information about The ``get_language_info()`` function provides detailed information about
languages:: languages::

View File

@ -1290,7 +1290,7 @@ For each action, you can supply either a list of values or a string. When the
value already exists in the list, ``append`` and ``prepend`` have no effect; value already exists in the list, ``append`` and ``prepend`` have no effect;
neither does ``remove`` when the value doesn't exist. neither does ``remove`` when the value doesn't exist.
.. function:: override_settings .. function:: override_settings(**kwargs)
In case you want to override a setting for a test method, Django provides the In case you want to override a setting for a test method, Django provides the
:func:`~django.test.override_settings` decorator (see :pep:`318`). It's used :func:`~django.test.override_settings` decorator (see :pep:`318`). It's used
@ -1316,7 +1316,7 @@ The decorator can also be applied to :class:`~django.test.TestCase` classes::
response = self.client.get('/sekrit/') response = self.client.get('/sekrit/')
self.assertRedirects(response, '/other/login/?next=/sekrit/') self.assertRedirects(response, '/other/login/?next=/sekrit/')
.. function:: modify_settings .. function:: modify_settings(*args, **kwargs)
Likewise, Django provides the :func:`~django.test.modify_settings` Likewise, Django provides the :func:`~django.test.modify_settings`
decorator:: decorator::