flask app builder

Solutions on MaxInterview for flask app builder by the best coders in the world

showing results for - "flask app builder"
Gaia
24 Jun 2019
1# JOKER coding scripts
2# https://flask-appbuilder.readthedocs.io/en/latest/quickminimal.html
3
4import os
5from flask import Flask
6from flask_appbuilder import SQLA, AppBuilder
7
8# init Flask
9app = Flask(__name__)
10
11# Basic config with security for forms and session cookie
12basedir = os.path.abspath(os.path.dirname(__file__))
13app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'app.db')
14app.config['CSRF_ENABLED'] = True
15app.config['SECRET_KEY'] = 'thisismyscretkey'
16
17# Init SQLAlchemy
18db = SQLA(app)
19# Init F.A.B.
20appbuilder = AppBuilder(app, db.session)
21
22# Run the development server
23app.run(host='0.0.0.0', port=8080, debug=True)
24