Commit 4f329c23 authored by momentxu's avatar momentxu

bootswatch theme's example

parent bf26d397
...@@ -4,7 +4,6 @@ from flask import Flask ...@@ -4,7 +4,6 @@ from flask import Flask
from flask_sqlalchemy import SQLAlchemy from flask_sqlalchemy import SQLAlchemy
import flask_admin as admin import flask_admin as admin
print(admin.__version__)
from flask_admin.contrib.sqla import ModelView from flask_admin.contrib.sqla import ModelView
...@@ -13,6 +12,7 @@ app = Flask(__name__) ...@@ -13,6 +12,7 @@ app = Flask(__name__)
# Create dummy secrey key so we can use sessions # Create dummy secrey key so we can use sessions
app.config['SECRET_KEY'] = '123456790' app.config['SECRET_KEY'] = '123456790'
app.config['FLASK_ADMIN_SWATCH'] = 'Flatly'
# Create in-memory database # Create in-memory database
app.config['DATABASE_FILE'] = 'sample_db.sqlite' app.config['DATABASE_FILE'] = 'sample_db.sqlite'
...@@ -138,6 +138,7 @@ def build_sample_db(): ...@@ -138,6 +138,7 @@ def build_sample_db():
db.session.commit() db.session.commit()
return return
if __name__ == '__main__': if __name__ == '__main__':
# Build a sample db on the fly, if one does not exist yet. # Build a sample db on the fly, if one does not exist yet.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment