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
9eb49af8
Kaydet (Commit)
9eb49af8
authored
Eki 13, 2016
tarafından
Kevin Christopher Henry
Kaydeden (comit)
Tim Graham
Eki 14, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #19705 -- Documented decorator ordering with @condition().
üst
4cfccc71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
conditional-view-processing.txt
docs/topics/conditional-view-processing.txt
+12
-0
No files found.
docs/topics/conditional-view-processing.txt
Dosyayı görüntüle @
9eb49af8
...
@@ -105,6 +105,18 @@ for your front page view::
...
@@ -105,6 +105,18 @@ for your front page view::
def front_page(request, blog_id):
def front_page(request, blog_id):
...
...
.. admonition:: Be careful with the order of decorators
When ``condition()`` returns a conditional response, any decorators below
it will be skipped and won't apply to the response. Therefore, any
decorators that need to apply to both the regular view response and a
conditional response must be above ``condition()``. In particular,
:func:`~django.views.decorators.vary.vary_on_cookie`,
:func:`~django.views.decorators.vary.vary_on_headers`, and
:func:`~django.views.decorators.cache.cache_control` should come first
because :rfc:`RFC 7232 <7232#section-4.1>` requires that the headers they
set be present on 304 responses.
Shortcuts for only computing one value
Shortcuts for only computing one value
======================================
======================================
...
...
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