mirror of https://github.com/snachodog/mybuddy.git
parent
5598482d53
commit
359846fe57
|
@ -101,9 +101,10 @@ TEMPLATES = [
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
|
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
|
||||||
|
|
||||||
config = {'ENGINE': os.getenv('DB_ENGINE') or 'django.db.backends.sqlite3'}
|
config = {
|
||||||
if os.getenv('DB_NAME'):
|
'ENGINE': os.getenv('DB_ENGINE') or 'django.db.backends.sqlite3',
|
||||||
config['NAME'] = os.getenv('DB_NAME')
|
'NAME': os.getenv('DB_NAME') or os.path.join(BASE_DIR, 'data/db.sqlite3')
|
||||||
|
}
|
||||||
if os.getenv('DB_USER'):
|
if os.getenv('DB_USER'):
|
||||||
config['USER'] = os.getenv('DB_USER')
|
config['USER'] = os.getenv('DB_USER')
|
||||||
if os.environ.get('DB_PASSWORD') or os.environ.get('POSTGRES_PASSWORD'):
|
if os.environ.get('DB_PASSWORD') or os.environ.get('POSTGRES_PASSWORD'):
|
||||||
|
|
Loading…
Reference in New Issue