Merge pull request #11 from channelcat/master

merge upstream master branch
This commit is contained in:
7 2017-08-20 22:51:19 -07:00 committed by GitHub
commit 747c21da70
4 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -17,7 +17,9 @@ deps =
beautifulsoup4
gunicorn
commands =
pytest tests --cov sanic --cov-report term-missing {posargs}
pytest tests --cov sanic --cov-report= {posargs}
- coverage combine --append
coverage report -m
[testenv:flake8]
deps =