Merge pull request #711 from stopspazzing/master
Use of register_blueprint will be deprecated, why not upgrade?
This commit is contained in:
commit
f9d428de8b
|
@ -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)
|
Loading…
Reference in New Issue
Block a user