Actually bind flask-admin to the mail servers

This commit is contained in:
Pierre Jaury
2016-02-20 20:11:59 +01:00
parent 61c99c7014
commit 48fbf737ce
13 changed files with 98 additions and 27 deletions

View File

@@ -1,14 +1,22 @@
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import os
# Create application
app = Flask(__name__)
app.config.update({
'SQLALCHEMY_DATABASE_URI': 'sqlite:////tmp/freeposte.db'
})
default_config = {
'SQLALCHEMY_DATABASE_URI': 'sqlite:////data/freeposte.db',
'SQLALCHEMY_TRACK_MODIFICATIONS': False,
'SECRET_KEY': None
}
# Load configuration from the environment if available
for key, value in default_config.items():
app.config[key] = os.environ.get(key, value)
# Create the database
db = SQLAlchemy(app)