mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-16 13:08:03 +00:00
Fix, when local dev
This commit is contained in:
@@ -13,6 +13,7 @@ ALLOWED_HOSTS = [
|
|||||||
gethostname(),
|
gethostname(),
|
||||||
gethostbyname(gethostname()),
|
gethostbyname(gethostname()),
|
||||||
'.openshiftapps.com',
|
'.openshiftapps.com',
|
||||||
|
'127.0.0.1',
|
||||||
]
|
]
|
||||||
|
|
||||||
from ivatar.settings import INSTALLED_APPS # noqa
|
from ivatar.settings import INSTALLED_APPS # noqa
|
||||||
@@ -92,7 +93,11 @@ try:
|
|||||||
from ivatar.settings import DATABASES
|
from ivatar.settings import DATABASES
|
||||||
except Exception: # pragma: no cover
|
except Exception: # pragma: no cover
|
||||||
DATABASES = [] # pragma: no cover
|
DATABASES = [] # pragma: no cover
|
||||||
DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}
|
if not 'default' in DATABASES:
|
||||||
|
DATABASES['default'] = {
|
||||||
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||||
|
}
|
||||||
|
|
||||||
if 'MYSQL_DATABASE' in os.environ:
|
if 'MYSQL_DATABASE' in os.environ:
|
||||||
DATABASES['default'] = {
|
DATABASES['default'] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user