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
ae8e9738
Kaydet (Commit)
ae8e9738
authored
Ara 09, 2012
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #12502 -- Improved middleware diagram.
üst
49519328
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
middleware.graffle
docs/topics/http/_images/middleware.graffle
+0
-0
middleware.png
docs/topics/http/_images/middleware.png
+0
-0
middleware.svg
docs/topics/http/_images/middleware.svg
+0
-0
middleware.txt
docs/topics/http/middleware.txt
+13
-10
No files found.
docs/topics/http/_images/middleware.graffle
0 → 100644
Dosyayı görüntüle @
ae8e9738
This diff is collapsed.
Click to expand it.
docs/topics/http/_images/middleware.png
deleted
100644 → 0
Dosyayı görüntüle @
49519328
55 KB
docs/topics/http/_images/middleware.svg
0 → 100644
Dosyayı görüntüle @
ae8e9738
This diff is collapsed.
Click to expand it.
docs/topics/http/middleware.txt
Dosyayı görüntüle @
ae8e9738
...
@@ -32,17 +32,20 @@ created by :djadmin:`django-admin.py startproject <startproject>`::
...
@@ -32,17 +32,20 @@ created by :djadmin:`django-admin.py startproject <startproject>`::
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
)
During the request phases (:meth:`process_request` and :meth:`process_view`
During the request phases (:meth:`process_request` and :meth:`process_view`
),
middleware),
Django applies middleware in the order it's defined in
Django applies middleware in the order it's defined in
:setting:`MIDDLEWARE_CLASSES`, top-down. During the response phases
:setting:`MIDDLEWARE_CLASSES`, top-down. During the response phases
(:meth:`process_response` and :meth:`process_exception` middleware), the
(:meth:`process_template_response`, :meth:`process_response`, and
classes are applied in reverse order, from the bottom up. You can think of it
:meth:`process_exception`), the classes are applied in reverse order, from the
like an onion: each middleware class is a "layer" that wraps the view:
bottom up.
.. image:: _images/middleware.png
.. image:: _images/middleware.svg
:width: 502
:alt: middleware application order
:height: 417
:width: 480
:alt: Middleware application order.
:height: 408
If you prefer, you can also think of it like an onion: each middleware class
is a "layer" that wraps the view.
A Django installation doesn't require any middleware -- e.g.,
A Django installation doesn't require any middleware -- e.g.,
:setting:`MIDDLEWARE_CLASSES` can be empty, if you'd like -- but it's strongly
:setting:`MIDDLEWARE_CLASSES` can be empty, if you'd like -- but it's strongly
...
...
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