mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 05:04:25 +03:00
Added configuration option for Windows and if-statement for the postgres connection string.
This commit is contained in:
parent
f45698af3e
commit
3696cea41f
|
@ -9,5 +9,6 @@
|
||||||
"timezone": "UTC",
|
"timezone": "UTC",
|
||||||
"now": "2015/01/13",
|
"now": "2015/01/13",
|
||||||
"year": "{{ cookiecutter.now[:4] }}",
|
"year": "{{ cookiecutter.now[:4] }}",
|
||||||
"use_whitenoise": "y"
|
"use_whitenoise": "y",
|
||||||
|
"windows": "n"
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ MANAGERS = ADMINS
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
# Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ
|
# Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ
|
||||||
'default': env.db("DATABASE_URL", default="postgres:///{{cookiecutter.repo_name}}"),
|
'default': env.db("DATABASE_URL", default="postgres://{% if cookiecutter.windows == 'y' %}localhost{% endif %}/{{cookiecutter.repo_name}}"),
|
||||||
}
|
}
|
||||||
DATABASES['default']['ATOMIC_REQUESTS'] = True
|
DATABASES['default']['ATOMIC_REQUESTS'] = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user