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
787cc7aa
Kaydet (Commit)
787cc7aa
authored
Agu 08, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #25236 -- Discouraged use of ifequal/ifnotequal template tags.
üst
7080cef7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
37 deletions
+8
-37
builtins.txt
docs/ref/templates/builtins.txt
+8
-35
spelling_wordlist
docs/spelling_wordlist
+0
-2
No files found.
docs/ref/templates/builtins.txt
Dosyayı görüntüle @
787cc7aa
...
@@ -568,6 +568,14 @@ If you need different precedence, you will need to use nested :ttag:`if` tags.
...
@@ -568,6 +568,14 @@ If you need different precedence, you will need to use nested :ttag:`if` tags.
Sometimes that is better for clarity anyway, for the sake of those who do not
Sometimes that is better for clarity anyway, for the sake of those who do not
know the precedence rules.
know the precedence rules.
``ifequal`` and ``ifnotequal``
""""""""""""""""""""""""""""""
``{% ifequal a b %} ... {% endifequal %}`` is an obsolete way to write
``{% if a == b %} ... {% endif %}``. Likewise, ``{% ifnotequal a b %} ...
{% endifnotequal %}`` is superseded by ``{% if a != b %} ... {% endif %}``.
The ``ifequal`` and ``ifnotequal`` tags will be deprecated in a future release.
.. templatetag:: ifchanged
.. templatetag:: ifchanged
ifchanged
ifchanged
...
@@ -613,41 +621,6 @@ will be displayed if the value has not changed::
...
@@ -613,41 +621,6 @@ will be displayed if the value has not changed::
">{{ match }}</div>
">{{ match }}</div>
{% endfor %}
{% endfor %}
.. templatetag:: ifequal
ifequal
^^^^^^^
Output the contents of the block if the two arguments equal each other.
Example::
{% ifequal user.pk comment.user_id %}
...
{% endifequal %}
As in the :ttag:`if` tag, an ``{% else %}`` clause is optional.
The arguments can be hard-coded strings, so the following is valid::
{% ifequal user.username "adrian" %}
...
{% endifequal %}
An alternative to the ``ifequal`` tag is to use the :ttag:`if` tag and the
``==`` operator.
.. templatetag:: ifnotequal
ifnotequal
^^^^^^^^^^
Just like :ttag:`ifequal`, except it tests that the two arguments are not
equal.
An alternative to the ``ifnotequal`` tag is to use the :ttag:`if` tag and
the ``!=`` operator.
.. templatetag:: include
.. templatetag:: include
include
include
...
...
docs/spelling_wordlist
Dosyayı görüntüle @
787cc7aa
...
@@ -350,8 +350,6 @@ iendswith
...
@@ -350,8 +350,6 @@ iendswith
ies
ies
iexact
iexact
ifchanged
ifchanged
ifequal
ifnotequal
iframe
iframe
inbox
inbox
Incompliance
Incompliance
...
...
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