Fix config.py.
Default to .env DATABASE_URL, fallback to DATABASE_URL on app.db
This commit is contained in:
parent
d665a8649f
commit
cd7fa8e233
@ -1,6 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
|
from dotenv import load_dotenv
|
||||||
basedir = os.path.abspath(os.path.dirname(__file__))
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
load_dotenv(os.path.join(basedir, '.env'))
|
||||||
|
|
||||||
class Config(object):
|
class Config(object):
|
||||||
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
|
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
|
||||||
|
Reference in New Issue
Block a user