Commit 2e6d8a58 authored by Evili del Rio's avatar Evili del Rio

Change project name calculation

parent abb0c555
Pipeline #1790 canceled with stages
in 9 minutes and 56 seconds
......@@ -50,14 +50,14 @@ for st,val in __settings.items():
exec(st+" = "+env_setting)
if os.getenv('DJANGO_DATABASES', None) is None:
_PROJECT_NAME = os.getenv('DJANGO_SETTINGS_MODULE').split('.')[0]
__PROJECT_NAME = os.getenv('DJANGO__PROJECT_NAME',
__default_settings.__package__.split('.')[0])
DATABASES = {
'default': {
'ENGINE': os.getenv('DJANGO_DATABASE_ENGINE','django.db.backends.postgresql'),
'HOST': os.getenv('DJANGO_DATABASE_HOST', os.getenv('POSTGRES_HOST', 'postgres')),
'NAME': os.getenv('DJANGO_DATABASE_NAME', os.getenv('POSTGRES_DB', _PROJECT_NAME)),
'USER': os.getenv('DJANGO_DATABASE_USER', os.getenv('POSTGRES_USER', _PROJECT_NAME)),
'PASSWORD' : os.getenv('DJANGO_DATABASE_PASSWORD', os.getenv('POSTGRES_PASSWORD', _PROJECT_NAME)),
'NAME': os.getenv('DJANGO_DATABASE_NAME', os.getenv('POSTGRES_DB', __PROJECT_NAME)),
'USER': os.getenv('DJANGO_DATABASE_USER', os.getenv('POSTGRES_USER', __PROJECT_NAME)),
'PASSWORD' : os.getenv('DJANGO_DATABASE_PASSWORD', os.getenv('POSTGRES_PASSWORD', __PROJECT_NAME)),
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment