absoludity · GitHub

@@ -2,29 +2,7 @@ DEBUG = True

22

TEMPLATE_DEBUG = DEBUG

33

SECRET_KEY = '{{ django_secret_key }}'

445-

{% if 'db' in relations %}

6-

DATABASES = {

7-

{% for dbrelation in relations['db'] %}

8-

{% if loop.first %}

9-

{% set services=relations['db'][dbrelation] %}

10-

{% for service in services %}

11-

{% if service.startswith('postgres') %}

12-

{% set dbdetails = services[service] %}

13-

{% if 'database' in dbdetails %}

14-

'default': {

15-

'ENGINE': 'django.db.backends.postgresql_psycopg2',

16-

'NAME': '{{ dbdetails["database"] }}',

17-

'HOST': '{{ dbdetails["host"] }}',

18-

'USER': '{{ dbdetails["user"] }}',

19-

'PASSWORD': '{{ dbdetails["password"] }}',

20-

}

21-

{% endif %}

22-

{% endif %}

23-

{% endfor %}

24-

{% endif %}

25-

{% endfor %}

26-

}

27-

{% endif %}

5+

from database_settings import DATABASES

286297

TIME_ZONE = 'UTC'

308

ROOT_URLCONF = 'clickreviewsproject.urls'

Read the original on github.com ↗