forked from orbit-oss/flask
Blueprint example app
This commit is contained in:
parent
20a3281209
commit
85ad4ffb60
7 changed files with 64 additions and 0 deletions
11
examples/blueprintexample/blueprintexample.py
Normal file
11
examples/blueprintexample/blueprintexample.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from flask import Flask
|
||||
from simple_page.simple_page import simple_page
|
||||
|
||||
app = Flask(__name__)
|
||||
app.register_blueprint(simple_page)
|
||||
# Blueprint can be registered many times
|
||||
app.register_blueprint(simple_page, url_prefix='/pages')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue