Split config from app; some style changes

This commit is contained in:
Yusur 2019-10-10 19:31:36 +02:00
parent 91b77f1cb0
commit 8e26a72bc9
3 changed files with 9 additions and 6 deletions

8
app.py
View file

@ -8,14 +8,10 @@ from functools import wraps
__version__ = '0.4-dev'
DATABASE = 'coriplus.sqlite'
DEBUG = True
SECRET_KEY = 'hin6bab8ge25*r=x&+5$0kn=-#log$pt^#@vrqjld!^2ci@g*b'
app = Flask(__name__)
app.config.from_object(__name__)
app.config.from_pyfile('config.py')
database = SqliteDatabase(DATABASE)
database = SqliteDatabase(app.config['DATABASE'])
class BaseModel(Model):
class Meta: