mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-08 05:54:53 +03:00
postgress password
This commit is contained in:
parent
8d02940b1f
commit
68c4fa5f4f
|
@ -32,7 +32,11 @@ def pingpost():
|
||||||
pg_user = os.environ['POSTGRES_USER']
|
pg_user = os.environ['POSTGRES_USER']
|
||||||
else:
|
else:
|
||||||
os.environ['POSTGRES_USER'] = pg_user = 'postgres'
|
os.environ['POSTGRES_USER'] = pg_user = 'postgres'
|
||||||
|
|
||||||
|
try:
|
||||||
pg_pass = os.environ['POSTGRES_PASSWORD']
|
pg_pass = os.environ['POSTGRES_PASSWORD']
|
||||||
|
except Exception as e:
|
||||||
|
pg_pass = ''
|
||||||
|
|
||||||
DATABASE_URL='postgres://{username}:{password}@postgres:5432/{username}'
|
DATABASE_URL='postgres://{username}:{password}@postgres:5432/{username}'
|
||||||
DATABASE_URL = DATABASE_URL.format(username=pg_user, password=pg_pass),
|
DATABASE_URL = DATABASE_URL.format(username=pg_user, password=pg_pass),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user