You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where `get_response` is an async function, sync functions are not supported and will raise an error.
13
+
where `get_response` is an **async function**, sync functions are not supported and **will raise** an error.
14
14
15
15
----------------------------
16
16
17
17
other methods are as follows:
18
18
19
-
*`process_request` and `process_response` are `await`ed inside the middleware and have to be async
19
+
*`process_request` and `process_response` are `await`ed inside the middleware and **have to be async**.
20
20
21
21
*`process_view` and `process_template_response` can be either sync or async, but **async is preferred**, if it's sync django will wrap it as async which might have slight performance reduction.
22
22
23
23
*`process_exception` can be either sync or async, but **sync is preferred**, if async is used django wraps the method to be called synchronously.
0 commit comments