From 7a65471ba54c9f9f57ff29c7ef712bf7a08df22d Mon Sep 17 00:00:00 2001 From: lixxu Date: Mon, 29 Oct 2018 16:54:34 +0800 Subject: [PATCH] update doc for latest blueprint code --- docs/sanic/blueprints.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/sanic/blueprints.md b/docs/sanic/blueprints.md index 53aef5fd..9a47609c 100644 --- a/docs/sanic/blueprints.md +++ b/docs/sanic/blueprints.md @@ -48,7 +48,7 @@ by that blueprint. In this example, the registered routes in the `app.router` will look like: ```python -[Route(handler=, methods=None, pattern=re.compile('^/$'), parameters=[])] +[Route(handler=, methods=frozenset({'GET'}), pattern=re.compile('^/$'), parameters=[], name='my_blueprint.bp_root', uri='/')] ``` ## Blueprint groups and nesting @@ -87,7 +87,7 @@ from sanic import Blueprint from .static import static from .authors import authors -content = Blueprint.group(assets, authors, url_prefix='/content') +content = Blueprint.group(static, authors, url_prefix='/content') ``` ```python # api/info.py @@ -254,5 +254,3 @@ async def root(request): async def post_handler(request, post_id): return text('Post {} in Blueprint V1'.format(post_id)) ``` - -