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
0b074160
Kaydet (Commit)
0b074160
authored
May 18, 2013
tarafından
Zbigniew Siciarz
Kaydeden (comit)
Florian Apolloner
May 18, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #20294 -- Documented context processors in TemplateResponseMixin.
üst
8fd44b25
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
mixins-simple.txt
docs/ref/class-based-views/mixins-simple.txt
+11
-0
No files found.
docs/ref/class-based-views/mixins-simple.txt
Dosyayı görüntüle @
0b074160
...
@@ -60,6 +60,17 @@ TemplateResponseMixin
...
@@ -60,6 +60,17 @@ TemplateResponseMixin
altered later (e.g. in
altered later (e.g. in
:ref:`template response middleware <template-response-middleware>`).
:ref:`template response middleware <template-response-middleware>`).
.. admonition:: Context processors
``TemplateResponse`` uses :class:`~django.template.RequestContext`
which means that callables defined in
:setting:`TEMPLATE_CONTEXT_PROCESSORS` may overwrite template
variables defined in your views. For example, if you subclass
:class:`DetailView <django.views.generic.detail.DetailView>` and
set ``context_object_name`` to ``user``, the
``django.contrib.auth.context_processors.auth`` context processor
will happily overwrite your variable with current user.
If you need custom template loading or custom context object
If you need custom template loading or custom context object
instantiation, create a ``TemplateResponse`` subclass and assign it to
instantiation, create a ``TemplateResponse`` subclass and assign it to
``response_class``.
``response_class``.
...
...
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