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
b6dd0afe
Kaydet (Commit)
b6dd0afe
authored
Ara 03, 2015
tarafından
Alasdair Nicol
Kaydeden (comit)
Tim Graham
Ara 03, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #25851 -- Removed links to deprecated assignment tag docs.
üst
4d0f8831
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
custom-template-tags.txt
docs/howto/custom-template-tags.txt
+3
-6
1.4.txt
docs/releases/1.4.txt
+6
-8
No files found.
docs/howto/custom-template-tags.txt
Dosyayı görüntüle @
b6dd0afe
...
...
@@ -647,8 +647,6 @@ positional arguments. For example:
{% my_tag 123 "abcd" book.title warning=message|lower profile=user.profile %}
.. _howto-custom-template-tags-assignment-tags:
Assignment tags
~~~~~~~~~~~~~~~
...
...
@@ -1120,10 +1118,9 @@ The difference here is that ``do_current_time()`` grabs the format string and
the variable name, passing both to ``CurrentTimeNode3``.
Finally, if you only need to have a simple syntax for your custom
context-updating template tag, you might want to consider using the
:ref:`assignment tag <howto-custom-template-tags-assignment-tags>` shortcut
we introduced above.
context-updating template tag, consider using the
:meth:`~django.template.Library.simple_tag` shortcut, which supports assigning
the tag results to a template variable.
Parsing until another block tag
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
docs/releases/1.4.txt
Dosyayı görüntüle @
b6dd0afe
...
...
@@ -406,19 +406,17 @@ object generic views.
Assignment template tags
~~~~~~~~~~~~~~~~~~~~~~~~
A new
:ref:`assignment_tag<howto-custom-template-tags-assignment-tags>` helper
function was added to ``template.Library`` to ease the creation of template
tags that store data in a specified context
variable.
A new
``assignment_tag`` helper function was added to ``template.Library`` to
ease the creation of template tags that store data in a specified context
variable.
``*args`` and ``**kwargs`` support for template tag helper functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The :ref:`simple_tag<howto-custom-template-tags-simple-tags>`,
:ref:`inclusion_tag <howto-custom-template-tags-inclusion-tags>` and
newly introduced
:ref:`assignment_tag<howto-custom-template-tags-assignment-tags>` template
helper functions may now accept any number of positional or keyword arguments.
For example::
:ref:`inclusion_tag <howto-custom-template-tags-inclusion-tags>` and newly
introduced ``assignment_tag`` template helper functions may now accept any
number of positional or keyword arguments. For example::
@register.simple_tag
def my_tag(a, b, *args, **kwargs):
...
...
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