parent
73ef816d89
commit
0c28cdbaf4
|
@ -56,9 +56,7 @@ In this example, the registered routes in the `app.router` will look like:
|
|||
```
|
||||
|
||||
## Middleware
|
||||
Using blueprints allows you to also register middleware exclusively for that
|
||||
blueprint, without interfering with other blueprints or routes registered
|
||||
directly on the application object.
|
||||
Using blueprints allows you to also register middleware globally.
|
||||
|
||||
```python
|
||||
@bp.middleware
|
||||
|
@ -75,8 +73,7 @@ async def halt_response(request, response):
|
|||
```
|
||||
|
||||
## Exceptions
|
||||
Exceptions can also be applied exclusively to blueprints without interfering
|
||||
with other blueprints or routes registered on the application object.
|
||||
Exceptions can also be applied exclusively to blueprints globally.
|
||||
|
||||
```python
|
||||
@bp.exception(NotFound)
|
||||
|
|
Loading…
Reference in New Issue
Block a user