diff options
| author | David Evans <d@evans.io> | 2016-04-03 14:43:51 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-04-04 10:12:41 -0400 |
| commit | 99bb7fcc1859615a7b8c2468e7b97d54853bfb10 (patch) | |
| tree | 0a29d604e71f8ac1de258ca1b641199a3294cc2d /docs | |
| parent | 23aa700b788e073e6efc4585425c0bd6d3092569 (diff) | |
Fixed #26452 -- Loaded middleware on server start rather than on first request.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.10.txt | 3 | ||||
| -rw-r--r-- | docs/topics/http/middleware.txt | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index fc155735dc..96b9d23f62 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -714,6 +714,9 @@ Miscellaneous :class:`~django.contrib.postgres.fields.RangeField`, you should change the ``base_field`` attribute. +* Middleware classes are now initialized when the server starts rather than + during the first request. + .. _deprecated-features-1.10: Features deprecated in 1.10 diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt index e84aafa123..16fdace825 100644 --- a/docs/topics/http/middleware.txt +++ b/docs/topics/http/middleware.txt @@ -260,8 +260,12 @@ of caveats: define ``__init__`` as requiring any arguments. * Unlike the ``process_*`` methods which get called once per request, - ``__init__`` gets called only *once*, when the Web server responds to the - first request. + ``__init__`` gets called only *once*, when the Web server starts. + +.. versionchanged:: 1.10 + + In older versions, ``__init__`` was not called until the Web server + responded to its first request. Marking middleware as unused ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
