Skip to content

Commit a4b6bc5

Browse files
committed
update middleware docs formatting
1 parent f7ec20c commit a4b6bc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/middleware/base.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ with the following specification:
1010
>>> middleware = AsyncMiddlewareMixin(get_response)
1111
>>> await middleware()
1212
```
13-
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.
1414

1515
----------------------------
1616

1717
other methods are as follows:
1818

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**
2020

2121
* `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.
2222

0 commit comments

Comments
 (0)