- make blueprint add_route method support view instance

- update documentation that doesn't specify url_prefix parameter
This commit is contained in:
growingdever
2017-02-14 14:23:22 +09:00
parent 1866e4ef44
commit d57d90fe6b
2 changed files with 10 additions and 6 deletions

View File

@@ -131,8 +131,8 @@ can be used to implement our API versioning scheme.
from sanic.response import text
from sanic import Blueprint
blueprint_v1 = Blueprint('v1')
blueprint_v2 = Blueprint('v2')
blueprint_v1 = Blueprint('v1', url_prefix='/v1')
blueprint_v2 = Blueprint('v2', url_prefix='/v2')
@blueprint_v1.route('/')
async def api_v1_root(request):