From a17b3f1b84d9c87ef3e469a140896dc4dabf9a2b Mon Sep 17 00:00:00 2001 From: Jeremy Zimmerman Date: Thu, 11 May 2017 12:33:57 -0700 Subject: [PATCH] Use of register_blueprint will be deprecated, why not upgrade? --- examples/vhosts.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vhosts.py b/examples/vhosts.py index 50c9b6f6..91b2b647 100644 --- a/examples/vhosts.py +++ b/examples/vhosts.py @@ -17,10 +17,6 @@ bp = Blueprint("bp", host="bp.example.com") async def hello(request): return response.text("Some defaults") -@app.route('/', host="example.com") -async def hello(request): - return response.text("Answer") - @app.route('/', host="sub.example.com") async def hello(request): return response.text("42") @@ -33,7 +29,7 @@ async def hello(request): async def hello(request): return response.text("42") -app.register_blueprint(bp) +app.blueprint(bp) if __name__ == '__main__': app.run(host="0.0.0.0", port=8000) \ No newline at end of file