Commit de9ebdd3 authored by Preston Timmons's avatar Preston Timmons Committed by Tim Graham
Browse files

Fixed #24022 -- Deprecated the ssi tag.

parent a9aec115
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1088,6 +1088,11 @@ def ssi(parser, token):

        {% ssi "/home/html/ljworld.com/includes/right_generic.html" parsed %}
    """
    warnings.warn(
        "The {% ssi %} tag is deprecated. Use the {% include %} tag instead.",
        RemovedInDjango20Warning,
    )

    bits = token.split_contents()
    parsed = False
    if len(bits) not in (2, 3):
+2 −0
Original line number Diff line number Diff line
@@ -125,6 +125,8 @@ details on these changes.

* The ``--list`` option of the ``migrate`` management command will be removed.

* The ``ssi`` template tag will be removed.

.. _deprecation-removed-in-1.9:

1.9
+8 −2
Original line number Diff line number Diff line
@@ -125,8 +125,14 @@ Default: ``()`` (Empty tuple)

.. deprecated:: 1.8

    Set the ``'allowed_include_roots'`` option in the :setting:`OPTIONS
    <TEMPLATES-OPTIONS>` of a ``DjangoTemplates`` backend instead.
    This setting, along with the :ttag:`ssi` template tag, is deprecated and
    will be removed in Django 2.0.

.. versionchanged:: 1.8

    You can also set the ``'allowed_include_roots'`` option in the
    :setting:`OPTIONS <TEMPLATES-OPTIONS>` of a ``DjangoTemplates`` backend
    instead.

A tuple of strings representing allowed prefixes for the ``{% ssi %}`` template
tag. This is a security measure, so that template authors can't access files
+5 −2
Original line number Diff line number Diff line
@@ -705,8 +705,6 @@ available to the included template::
    been evaluated and rendered* - not blocks that can be overridden by, for
    example, an extending template.

See also: :ttag:`{% ssi %}<ssi>`.

.. templatetag:: load

load
@@ -979,6 +977,11 @@ this example, the space around ``Hello`` won't be stripped::
ssi
^^^

.. deprecated:: 1.8

    This tag has been deprecated and will be removed in Django 2.0. Use the
    :ttag:`include` tag instead.

Outputs the contents of a given file into the page.

Like a simple :ttag:`include` tag, ``{% ssi %}`` includes the contents of
+8 −0
Original line number Diff line number Diff line
@@ -1385,6 +1385,14 @@ of ``Field.rel``. The latter is an instance of
module has been removed and the ``Field.related`` attribute will be removed in
Django 2.0.

``ssi`` template tag
~~~~~~~~~~~~~~~~~~~~

The :ttag:`ssi` template tag allows files to be included in a template by
absolute path. This is of limited use in most deployment situations, and
the :ttag:`include` tag often makes more sense. This tag is now deprecated and
will be removed in Django 2.0.

.. removed-features-1.8:

Features removed in 1.8
Loading