Détaché le nom de la bdd du fichier de config

This commit is contained in:
Darks 2019-08-31 23:00:43 +02:00
parent eeaab86d0a
commit f508536805
Signed by: Darks
GPG Key ID: F61F10FA138E797C
2 changed files with 3 additions and 2 deletions

View File

@ -1,10 +1,10 @@
import os
from db_config import DB_NAME
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'a-random-secret-key'
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
'postgresql+psycopg2://' + os.environ.get('USER') + ':@/pcv5'
'postgresql+psycopg2://' + os.environ.get('USER') + ':@/' + DB_NAME
SQLALCHEMY_TRACK_MODIFICATIONS = False
UPLOAD_FOLDER = './app/static/avatars'

1
db_config.py Normal file
View File

@ -0,0 +1 @@
DB_NAME = "pcv5-dev"