Merge pull request #11 from channelcat/master
merge upstream master branch
This commit is contained in:
commit
747c21da70
|
@ -31,13 +31,13 @@ Hello World Example
|
|||
Installation
|
||||
------------
|
||||
|
||||
- ``python -m pip install sanic``
|
||||
- ``pip install sanic``
|
||||
|
||||
To install sanic without uvloop or json using bash, you can provide either or both of these environmental variables
|
||||
using any truthy string like `'y', 'yes', 't', 'true', 'on', '1'` and setting the NO_X to true will stop that features
|
||||
installation.
|
||||
|
||||
- ``SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true python -m pip install sanic``
|
||||
- ``SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true pip install sanic``
|
||||
|
||||
|
||||
Documentation
|
||||
|
|
|
@ -172,7 +172,7 @@ takes the format `<blueprint_name>.<handler_name>`. For example:
|
|||
```python
|
||||
@blueprint_v1.route('/')
|
||||
async def root(request):
|
||||
url = app.url_for('v1.post_handler', post_id=5) # --> '/v1/post/5'
|
||||
url = request.app.url_for('v1.post_handler', post_id=5) # --> '/v1/post/5'
|
||||
return redirect(url)
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Middleware are functions which are executed before or after requests to the
|
|||
server. They can be used to modify the *request to* or *response from*
|
||||
user-defined handler functions.
|
||||
|
||||
Additionally, Sanic providers listeners which allow you to run code at various points of your application's lifecycle.
|
||||
Additionally, Sanic provides listeners which allow you to run code at various points of your application's lifecycle.
|
||||
|
||||
## Middleware
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user