OSX, Python2.7.13, virtualenv
Flask-AppBuilder (F.A.B or FAB) https://github.com/dpgaspar/Flask-AppBuilder
http://flask-appbuilder.readthedocs.io/en/latest/installation.html
% virtualenv env
% source env/bin/activate
% pip install flask-appbuilder
% fabmanager create-app testapp
% fabmanager create-app
Your new app name: testapp
Your engine type, SQLAlchemy or MongoEngine [SQLAlchemy]:
Downloaded the skeleton app, good coding!
% cd testapp
#Create an admin user
% fabmanager create-admin
Username [admin]:
User first name [admin]:
User last name [user]:
Email [[email protected]]:
Password:
Repeat for confirmation:
...
Recognized Database Authentications.
2017-05-08 22:39:16,699:INFO:flask_appbuilder.security.sqla.manager:Added user admin
Admin User admin created.
#Enable Japanese
% vi config.py
#coding:utf8 # <--Put at the beginning of the file
#Find the following and add or replace ja
LANGUAGES = {
'en': {'flag': 'gb', 'name': 'English'},
'ja': {'flag': 'jp', 'name': u'Japanese'},
}
% fabmanager run
...
2017-05-08 22:43:34,014:WARNING:werkzeug: * Debugger is active!
2017-05-08 22:43:34,030:INFO:werkzeug: * Debugger PIN: ....
Access http: // localhost: 8080 / with a browser
Top page
Login screen
After logging in
Try changing to Japanese
User list page
User information edit page
Security csrf is also supported by default
The airbnb superset is created with Flask-AppBuilder. https://github.com/airbnb/superset
By the way, the CI of master and a part of the management screen were broken, so I threw a PR https://github.com/dpgaspar/Flask-AppBuilder/commit/ad0c16e960d2923184cf15b5788338ad66289011 https://github.com/dpgaspar/Flask-AppBuilder/commit/d469462425a4756b4b9cf2a0b2313ee7f65769e5
Recommended Posts