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
890938e7
Kaydet (Commit)
890938e7
authored
Ara 09, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed redundant highlight/code-block directives in docs/ref/templates/builtins.txt.
üst
1aa8bf9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
22 deletions
+6
-22
builtins.txt
docs/ref/templates/builtins.txt
+6
-22
No files found.
docs/ref/templates/builtins.txt
Dosyayı görüntüle @
890938e7
...
@@ -12,7 +12,7 @@ documentation for any custom tags or filters installed.
...
@@ -12,7 +12,7 @@ documentation for any custom tags or filters installed.
Built-in tag reference
Built-in tag reference
----------------------
----------------------
.. highlight
lang
:: html+django
.. highlight:: html+django
.. templatetag:: autoescape
.. templatetag:: autoescape
...
@@ -548,9 +548,7 @@ operators, from lowest to highest, is as follows:
...
@@ -548,9 +548,7 @@ operators, from lowest to highest, is as follows:
* ``==``, ``!=``, ``<``, ``>``, ``<=``, ``>=``
* ``==``, ``!=``, ``<``, ``>``, ``<=``, ``>=``
(This follows Python exactly). So, for example, the following complex
(This follows Python exactly). So, for example, the following complex
:ttag:`if` tag:
:ttag:`if` tag::
.. code-block:: django
{% if a == b or c == d and e %}
{% if a == b or c == d and e %}
...
@@ -1894,9 +1892,7 @@ autoescaping is off, this filter has no effect.
...
@@ -1894,9 +1892,7 @@ autoescaping is off, this filter has no effect.
If you are chaining filters, a filter applied after ``safe`` can
If you are chaining filters, a filter applied after ``safe`` can
make the contents unsafe again. For example, the following code
make the contents unsafe again. For example, the following code
prints the variable as is, unescaped:
prints the variable as is, unescaped::
.. code-block:: html+django
{{ var|safe|escape }}
{{ var|safe|escape }}
...
@@ -2402,29 +2398,21 @@ static
...
@@ -2402,29 +2398,21 @@ static
static
static
""""""
""""""
.. highlight:: html+django
To link to static files that are saved in :setting:`STATIC_ROOT` Django ships
To link to static files that are saved in :setting:`STATIC_ROOT` Django ships
with a :ttag:`static` template tag. You can use this regardless if you're
with a :ttag:`static` template tag. You can use this regardless if you're
using :class:`~django.template.RequestContext` or not.
using :class:`~django.template.RequestContext` or not. For example::
.. code-block:: html+django
{% load static %}
{% load static %}
<img src="{% static "images/hi.jpg" %}" alt="Hi!" />
<img src="{% static "images/hi.jpg" %}" alt="Hi!" />
It is also able to consume standard context variables, e.g. assuming a
It is also able to consume standard context variables, e.g. assuming a
``user_stylesheet`` variable is passed to the template:
``user_stylesheet`` variable is passed to the template::
.. code-block:: html+django
{% load static %}
{% load static %}
<link rel="stylesheet" href="{% static user_stylesheet %}" type="text/css" media="screen" />
<link rel="stylesheet" href="{% static user_stylesheet %}" type="text/css" media="screen" />
If you'd like to retrieve a static URL without displaying it, you can use a
If you'd like to retrieve a static URL without displaying it, you can use a
slightly different call:
slightly different call::
.. code-block:: html+django
{% load static %}
{% load static %}
{% static "images/hi.jpg" as myphoto %}
{% static "images/hi.jpg" as myphoto %}
...
@@ -2448,8 +2436,6 @@ slightly different call:
...
@@ -2448,8 +2436,6 @@ slightly different call:
get_static_prefix
get_static_prefix
"""""""""""""""""
"""""""""""""""""
.. highlight:: html+django
You should prefer the :ttag:`static` template tag, but if you need more control
You should prefer the :ttag:`static` template tag, but if you need more control
over exactly where and how :setting:`STATIC_URL` is injected into the template,
over exactly where and how :setting:`STATIC_URL` is injected into the template,
you can use the :ttag:`get_static_prefix` template tag::
you can use the :ttag:`get_static_prefix` template tag::
...
@@ -2471,8 +2457,6 @@ the value multiple times::
...
@@ -2471,8 +2457,6 @@ the value multiple times::
get_media_prefix
get_media_prefix
""""""""""""""""
""""""""""""""""
.. highlight:: html+django
Similar to the :ttag:`get_static_prefix`, ``get_media_prefix`` populates a
Similar to the :ttag:`get_static_prefix`, ``get_media_prefix`` populates a
template variable with the media prefix :setting:`MEDIA_URL`, e.g.::
template variable with the media prefix :setting:`MEDIA_URL`, e.g.::
...
...
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