Browse Source

configurable database backend

master
aatish 4 years ago
parent
commit
b4bf9318df
  1. 2
      .env.sample
  2. 4
      ipv6work/settings.py

2
.env.sample

@ -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

4
ipv6work/settings.py

@ -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')),
}
}

Loading…
Cancel
Save