-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
32 lines (23 loc) · 808 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#from flask_bootstrap import Bootstrap
from flask import Flask
from extensions import database, commands
from config import DevelopmentConfig
# blueprint import
from blueprints.main.views import main
from blueprints.locator.views import locator
def create_app():
app = Flask(__name__)
# setup with the configuration provided by the user / environment
app.config.from_object(DevelopmentConfig)
# setup all our dependencies
database.init_app(app)
commands.init_app(app)
# register blueprint
app.register_blueprint(main)
app.register_blueprint(locator)
# set up bootstrap
#Bootstrap(app)
#app.add_url_rule('/favicon.ico', redirect_to=url_for('static', filename='favicon.ico'))
return app
if __name__ == "__main__":
create_app().run()