Commit af7d15f
If wsgi.multiprocess isn't set, render panels on each request.
* Avoid an exception with Django-channels
If you apply Django middlewares on a HttpRequest without "wsgi.multiprocess" in META, an exception is raised by DJT.
This simple patch avoids this bug.
* If wsgi.multiprocess isn't set, render panels on each request.
The likely cause of this is that the application is using ASGI since
wsgi.multiprocess is a required key for a WSGI application. Since the
toolbar currently doesn't support async applications, it's pretty likely
that it won't work for this request.
If you're a developer reading this and you think this is wrong, you can set
the RENDER_PANELS setting to forcibly control this setting.
---------
Co-authored-by: tschilling <[email protected]>1 parent 1960ca3 commit af7d15f
File tree
3 files changed
+42
-3
lines changed- debug_toolbar
- docs
- tests
3 files changed
+42
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
68 | 97 | | |
69 | 98 | | |
70 | 99 | | |
| |||
0 commit comments