configurable database backend

This commit is contained in:
aatish 2018-11-16 20:27:21 +05:45
parent 081e11400b
commit b4bf9318df
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,7 @@
DEBUG=True
DISABLE_IPV4_BLOCK=False
DATABASE_BACKEND='django.db.backends.postgresql'
DATABASE_NAME='app'
ALLOWED_HOSTS=.localhost, .ipv6.work
AUTH_LDAP_SERVER_URI=ldap://<ldap_host>
AUTH_LDAP_BIND_DN=cn=admin,dc=example,dc=com

View file

@ -102,8 +102,8 @@ WSGI_APPLICATION = 'ipv6work.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': config('DATABASE_BACKEND', default='django.db.backends.sqlite3'),
'NAME': config('DATABASE_NAME', default=os.path.join(BASE_DIR, 'db.sqlite3')),
}
}