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
9432f1e7
Kaydet (Commit)
9432f1e7
authored
Agu 19, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed some doc errors that caused syntax highlighting to fail.
üst
132d0e51
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
17 deletions
+24
-17
widgets.txt
docs/ref/forms/widgets.txt
+2
-2
api.txt
docs/ref/templates/api.txt
+1
-1
builtins.txt
docs/ref/templates/builtins.txt
+1
-1
translation.txt
docs/topics/i18n/translation.txt
+3
-1
security.txt
docs/topics/security.txt
+1
-1
templates.txt
docs/topics/templates.txt
+16
-11
No files found.
docs/ref/forms/widgets.txt
Dosyayı görüntüle @
9432f1e7
...
@@ -569,7 +569,7 @@ Selector and checkbox widgets
...
@@ -569,7 +569,7 @@ Selector and checkbox widgets
.. code-block:: html
.. code-block:: html
<ul>
<ul>
<li><input type='radio'
...
></li>
<li><input type='radio'
name='...'
></li>
...
...
</ul>
</ul>
...
@@ -663,7 +663,7 @@ Selector and checkbox widgets
...
@@ -663,7 +663,7 @@ Selector and checkbox widgets
.. code-block:: html
.. code-block:: html
<ul>
<ul>
<li><input type='checkbox'
...
></li>
<li><input type='checkbox'
name='...'
></li>
...
...
</ul>
</ul>
...
...
docs/ref/templates/api.txt
Dosyayı görüntüle @
9432f1e7
...
@@ -320,7 +320,7 @@ If you ``pop()`` too much, it'll raise
...
@@ -320,7 +320,7 @@ If you ``pop()`` too much, it'll raise
>>> c.pop()
>>> c.pop()
Traceback (most recent call last):
Traceback (most recent call last):
...
...
django.template.
ContextPopException
ContextPopException
.. versionadded:: 1.7
.. versionadded:: 1.7
...
...
docs/ref/templates/builtins.txt
Dosyayı görüntüle @
9432f1e7
...
@@ -108,7 +108,7 @@ Variables included in the cycle will be escaped. You can disable auto-escaping
...
@@ -108,7 +108,7 @@ Variables included in the cycle will be escaped. You can disable auto-escaping
with::
with::
{% for o in some_list %}
{% for o in some_list %}
<tr class="{% autoescape off %}{% cycle rowvalue1 rowvalue2 %}{% endautoescape %}
<tr class="{% autoescape off %}{% cycle rowvalue1 rowvalue2 %}{% endautoescape %}
">
...
...
</tr>
</tr>
{% endfor %}
{% endfor %}
...
...
docs/topics/i18n/translation.txt
Dosyayı görüntüle @
9432f1e7
...
@@ -1329,7 +1329,9 @@ For example, if your Django app contained a translation string for the text
...
@@ -1329,7 +1329,9 @@ For example, if your Django app contained a translation string for the text
_("Welcome to my site.")
_("Welcome to my site.")
...then :djadmin:`django-admin makemessages <makemessages>` will have created
...then :djadmin:`django-admin makemessages <makemessages>` will have created
a ``.po`` file containing the following snippet -- a message::
a ``.po`` file containing the following snippet -- a message:
.. code-block:: po
#: path/to/python/module.py:23
#: path/to/python/module.py:23
msgid "Welcome to my site."
msgid "Welcome to my site."
...
...
docs/topics/security.txt
Dosyayı görüntüle @
9432f1e7
...
@@ -31,7 +31,7 @@ protect the following:
...
@@ -31,7 +31,7 @@ protect the following:
.. code-block:: html+django
.. code-block:: html+django
<style class=
{{ var }}
>...</style>
<style class=
"{{ var }}"
>...</style>
If ``var`` is set to ``'class1 onmouseover=javascript:func()'``, this can result
If ``var`` is set to ``'class1 onmouseover=javascript:func()'``, this can result
in unauthorized JavaScript execution, depending on how the browser renders
in unauthorized JavaScript execution, depending on how the browser renders
...
...
docs/topics/templates.txt
Dosyayı görüntüle @
9432f1e7
...
@@ -549,9 +549,10 @@ disabled. Here is an example template::
...
@@ -549,9 +549,10 @@ disabled. Here is an example template::
The auto-escaping tag passes its effect onto templates that extend the
The auto-escaping tag passes its effect onto templates that extend the
current one as well as templates included via the :ttag:`include` tag,
current one as well as templates included via the :ttag:`include` tag,
just like all block tags. For example:
:
just like all block tags. For example:
# base.html
.. snippet::
:filename: base.html
{% autoescape off %}
{% autoescape off %}
<h1>{% block title %}{% endblock %}</h1>
<h1>{% block title %}{% endblock %}</h1>
...
@@ -559,18 +560,18 @@ just like all block tags. For example::
...
@@ -559,18 +560,18 @@ just like all block tags. For example::
{% endblock %}
{% endblock %}
{% endautoescape %}
{% endautoescape %}
.. snippet::
#
child.html
:filename:
child.html
{% extends "base.html" %}
{% extends "base.html" %}
{% block title %}This & that{% endblock %}
{% block title %}This &
amp;
that{% endblock %}
{% block content %}{{ greeting }}{% endblock %}
{% block content %}{{ greeting }}{% endblock %}
Because auto-escaping is turned off in the base template, it will also be
Because auto-escaping is turned off in the base template, it will also be
turned off in the child template, resulting in the following rendered
turned off in the child template, resulting in the following rendered
HTML when the ``greeting`` variable contains the string ``<b>Hello!</b>``::
HTML when the ``greeting`` variable contains the string ``<b>Hello!</b>``::
<h1>This & that</h1>
<h1>This &
amp;
that</h1>
<b>Hello!</b>
<b>Hello!</b>
Notes
Notes
...
@@ -606,9 +607,9 @@ This means you would write ::
...
@@ -606,9 +607,9 @@ This means you would write ::
{{ data|default:"3 < 2" }}
{{ data|default:"3 < 2" }}
...rather than
::
...rather than::
{{ data|default:"3 < 2" }}
<-- Bad! Don't do this.
{{ data|default:"3 < 2" }}
{# Bad! Don't do this. #}
This doesn't affect what happens to data coming from the variable itself.
This doesn't affect what happens to data coming from the variable itself.
The variable's contents are still automatically escaped, if necessary, because
The variable's contents are still automatically escaped, if necessary, because
...
@@ -638,14 +639,18 @@ of all comments related to the current task with::
...
@@ -638,14 +639,18 @@ of all comments related to the current task with::
{{ task.comment_set.all.count }}
{{ task.comment_set.all.count }}
And of course you can easily access methods you've explicitly defined on your
And of course you can easily access methods you've explicitly defined on your
own models::
own models:
.. snippet::
:filename: models.py
# In model
class Task(models.Model):
class Task(models.Model):
def foo(self):
def foo(self):
return "bar"
return "bar"
# In template
.. snippet::
:filename: template.html
{{ task.foo }}
{{ task.foo }}
Because Django intentionally limits the amount of logic processing available
Because Django intentionally limits the amount of logic processing available
...
...
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