Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
de9ebdd3
Kaydet (Commit)
de9ebdd3
authored
Ock 05, 2015
tarafından
Preston Timmons
Kaydeden (comit)
Tim Graham
Ock 06, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24022 -- Deprecated the ssi tag.
üst
a9aec115
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
6 deletions
+33
-6
defaulttags.py
django/template/defaulttags.py
+5
-0
deprecation.txt
docs/internals/deprecation.txt
+2
-0
settings.txt
docs/ref/settings.txt
+8
-2
builtins.txt
docs/ref/templates/builtins.txt
+5
-2
1.8.txt
docs/releases/1.8.txt
+8
-0
test_ssi.py
tests/template_tests/syntax_tests/test_ssi.py
+2
-1
tests.py
tests/template_tests/tests.py
+3
-1
No files found.
django/template/defaulttags.py
Dosyayı görüntüle @
de9ebdd3
...
...
@@ -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
):
...
...
docs/internals/deprecation.txt
Dosyayı görüntüle @
de9ebdd3
...
...
@@ -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
...
...
docs/ref/settings.txt
Dosyayı görüntüle @
de9ebdd3
...
...
@@ -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
...
...
docs/ref/templates/builtins.txt
Dosyayı görüntüle @
de9ebdd3
...
...
@@ -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
...
...
docs/releases/1.8.txt
Dosyayı görüntüle @
de9ebdd3
...
...
@@ -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
...
...
tests/template_tests/syntax_tests/test_ssi.py
Dosyayı görüntüle @
de9ebdd3
import
os
from
django.test
import
ignore_warnings
,
SimpleTestCase
from
django.utils.deprecation
import
RemovedInDjango19Warning
from
django.utils.deprecation
import
RemovedInDjango19Warning
,
RemovedInDjango20Warning
from
..utils
import
ROOT
,
setup
@ignore_warnings
(
category
=
RemovedInDjango20Warning
)
class
SsiTagTests
(
SimpleTestCase
):
# Test normal behavior
...
...
tests/template_tests/tests.py
Dosyayı görüntüle @
de9ebdd3
...
...
@@ -13,7 +13,8 @@ from django.template import (base as template_base, loader,
from
django.template.engine
import
Engine
from
django.template.loaders
import
app_directories
,
filesystem
from
django.test
import
RequestFactory
,
SimpleTestCase
from
django.test.utils
import
override_settings
,
extend_sys_path
from
django.test.utils
import
extend_sys_path
,
ignore_warnings
,
override_settings
from
django.utils.deprecation
import
RemovedInDjango20Warning
from
django.utils._os
import
upath
...
...
@@ -501,6 +502,7 @@ class RequestContextTests(unittest.TestCase):
RequestContext
(
request
,
dict_
=
test_data
,
engine
=
engine
))
@ignore_warnings
(
category
=
RemovedInDjango20Warning
)
class
SSITests
(
SimpleTestCase
):
def
setUp
(
self
):
self
.
this_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
upath
(
__file__
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment