-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathrun.py
More file actions
18 lines (12 loc) · 555 Bytes
/
Copy pathrun.py
File metadata and controls
18 lines (12 loc) · 555 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
from flask import Flask
from flask_appbuilder import AppBuilder, SQLA
app = Flask(__name__)
basedir = os.path.abspath(os.path.dirname(__file__))
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///" + os.path.join(basedir, "app.db")
app.config["CSRF_ENABLED"] = True
app.config["SECRET_KEY"] = "thisismyscretkey"
db = SQLA(app)
appbuilder = AppBuilder(app, db.session)
appbuilder.add_link("Flask documentation", href="https://flask-appbuilder.readthedocs.io", icon="fa-book", target="_blank")
app.run(host="0.0.0.0", port=8080, debug=True)