diff --git a/README.rst b/README.rst index a9bfa982..10bc8920 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/docs/sanic/blueprints.md b/docs/sanic/blueprints.md index b4fd06d7..5be33cb6 100644 --- a/docs/sanic/blueprints.md +++ b/docs/sanic/blueprints.md @@ -172,7 +172,7 @@ takes the format `.`. 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) diff --git a/docs/sanic/middleware.md b/docs/sanic/middleware.md index b2e8b45a..1a7f9d86 100644 --- a/docs/sanic/middleware.md +++ b/docs/sanic/middleware.md @@ -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 diff --git a/tox.ini b/tox.ini index dcebb050..ff43a139 100644 --- a/tox.ini +++ b/tox.ini @@ -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 =