Removed references to changes made in 1.2.

Thanks Florian Apolloner for the patch.
This commit is contained in:
Aymeric Augustin 2012-06-07 15:02:35 +02:00
parent 6492e8e5e6
commit c28e700c7e
46 changed files with 22 additions and 474 deletions

View file

@ -372,21 +372,11 @@ and return a dictionary of items to be merged into the context. By default,
"django.core.context_processors.static",
"django.contrib.messages.context_processors.messages")
.. versionadded:: 1.2
In addition to these, ``RequestContext`` always uses
``django.core.context_processors.csrf``. This is a security
related context processor required by the admin and other contrib apps, and,
in case of accidental misconfiguration, it is deliberately hardcoded in and
cannot be turned off by the :setting:`TEMPLATE_CONTEXT_PROCESSORS` setting.
.. versionadded:: 1.2
The ``'messages'`` context processor was added. For more information, see
the :doc:`messages documentation </ref/contrib/messages>`.
.. versionchanged:: 1.2
The auth context processor was moved in this release from its old location
``django.core.context_processors.auth`` to
``django.contrib.auth.context_processors.auth``.
In addition to these, ``RequestContext`` always uses
``django.core.context_processors.csrf``. This is a security
related context processor required by the admin and other contrib apps, and,
in case of accidental misconfiguration, it is deliberately hardcoded in and
cannot be turned off by the :setting:`TEMPLATE_CONTEXT_PROCESSORS` setting.
Each processor is applied in order. That means, if one processor adds a
variable to the context and a second processor adds a variable with the same
@ -447,10 +437,6 @@ If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
``django.contrib.auth.context_processors.PermWrapper``, representing the
permissions that the currently logged-in user has.
.. versionchanged:: 1.2
This context processor was moved in this release from
``django.core.context_processors.auth`` to its current location.
.. versionchanged:: 1.3
Prior to version 1.3, ``PermWrapper`` was located in
``django.contrib.auth.context_processors``.
@ -503,8 +489,6 @@ value of the :setting:`STATIC_URL` setting.
django.core.context_processors.csrf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 1.2
This processor adds a token that is needed by the :ttag:`csrf_token` template
tag for protection against :doc:`Cross Site Request Forgeries
</ref/contrib/csrf>`.
@ -527,15 +511,6 @@ If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
via the user model (using ``user.message_set.create``) or through
the :doc:`messages framework </ref/contrib/messages>`.
.. versionadded:: 1.2
This template context variable was previously supplied by the ``'auth'``
context processor. For backwards compatibility the ``'auth'`` context
processor will continue to supply the ``messages`` variable until Django
1.4. If you use the ``messages`` variable, your project will work with
either (or both) context processors, but it is recommended to add
``django.contrib.messages.context_processors.messages`` so your project
will be prepared for the future upgrade.
Writing your own context processors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -657,11 +632,6 @@ by editing your :setting:`TEMPLATE_LOADERS` setting. :setting:`TEMPLATE_LOADERS`
should be a tuple of strings, where each string represents a template loader
class. Here are the template loaders that come with Django:
.. versionchanged:: 1.2
Template loaders were based on callables (usually functions) before Django
1.2, starting with the 1.2 release there is a new class-based API, all the
loaders described below implement this new API.
``django.template.loaders.filesystem.Loader``
Loads templates from the filesystem, according to :setting:`TEMPLATE_DIRS`.
This loader is enabled by default.
@ -800,8 +770,6 @@ and any setting starting with ``TEMPLATE_`` is of obvious interest.
Using an alternative template language
======================================
.. versionadded:: 1.2
The Django ``Template`` and ``Loader`` classes implement a simple API for
loading and rendering templates. By providing some simple wrapper classes that
implement this API we can use third party template systems like `Jinja2

View file

@ -58,10 +58,8 @@ Ignores everything between ``{% comment %}`` and ``{% endcomment %}``.
csrf_token
^^^^^^^^^^
In the Django 1.1.X series, this is a no-op tag that returns an empty string
for future compatibility purposes. In Django 1.2 and later, it is used for
CSRF protection, as described in the documentation for :doc:`Cross Site Request
Forgeries </ref/contrib/csrf>`.
This tag is used for CSRF protection, as described in the documentation for
:doc:`Cross Site Request Forgeries </ref/contrib/csrf>`.
.. templatetag:: cycle
@ -410,8 +408,6 @@ variables or to negate a given variable::
There are some athletes and absolutely no coaches.
{% endif %}
.. versionchanged:: 1.2
Use of both ``and`` and ``or`` clauses within the same tag is allowed, with
``and`` having higher precedence than ``or`` e.g.::
@ -426,9 +422,6 @@ will be interpreted like:
Use of actual brackets in the :ttag:`if` tag is invalid syntax. If you need
them to indicate precedence, you should use nested :ttag:`if` tags.
.. versionadded:: 1.2
:ttag:`if` tags may also use the operators ``==``, ``!=``, ``<``, ``>``,
``<=``, ``>=`` and ``in`` which work as follows:
@ -637,9 +630,8 @@ You cannot check for equality with Python objects such as ``True`` or
``False``. If you need to test if something is true or false, use the
:ttag:`if` tag instead.
.. versionadded:: 1.2
An alternative to the ``ifequal`` tag is to use the :ttag:`if` tag and the
``==`` operator.
An alternative to the ``ifequal`` tag is to use the :ttag:`if` tag and the
``==`` operator.
.. templatetag:: ifnotequal
@ -649,9 +641,8 @@ ifnotequal
Just like :ttag:`ifequal`, except it tests that the two arguments are not
equal.
.. versionadded:: 1.2
An alternative to the ``ifnotequal`` tag is to use the :ttag:`if` tag and
the ``!=`` operator.
An alternative to the ``ifnotequal`` tag is to use the :ttag:`if` tag and
the ``!=`` operator.
.. templatetag:: include
@ -1127,9 +1118,6 @@ For example::
If ``value`` is ``4``, then the output will be ``6``.
.. versionchanged:: 1.2
The following behavior didn't exist in previous Django versions.
This filter will first try to coerce both values to integers. If this fails,
it'll attempt to add the values together anyway. This will work on some data
types (strings, list, etc.) and fail on others. If it fails, the result will
@ -1289,10 +1277,6 @@ Z Time zone offset in seconds. The ``-43200`` to ``4320
UTC is always positive.
================ ======================================== =====================
.. versionadded:: 1.2
The ``c`` and ``u`` format specification characters were added in Django 1.2.
.. versionadded:: 1.4
The ``e`` and ``o`` format specification characters were added in Django 1.4.
@ -1326,9 +1310,6 @@ When used without a format string::
...the formatting string defined in the :setting:`DATE_FORMAT` setting will be
used, without applying any localization.
.. versionchanged:: 1.2
Predefined formats can now be influenced by the current locale.
.. templatefilter:: default
default
@ -1985,9 +1966,6 @@ When used without a format string::
...the formatting string defined in the :setting:`TIME_FORMAT` setting will be
used, without applying any localization.
.. versionchanged:: 1.2
Predefined formats can now be influenced by the current locale.
.. templatefilter:: timesince
timesince