diff --git a/cookiecutter.json b/cookiecutter.json index 7f9590dc0..25233dbbf 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -9,5 +9,6 @@ "timezone": "UTC", "now": "2015/01/13", "year": "{{ cookiecutter.now[:4] }}", - "use_whitenoise": "y" + "use_whitenoise": "y", + "windows": "n" } diff --git a/{{cookiecutter.repo_name}}/config/settings/common.py b/{{cookiecutter.repo_name}}/config/settings/common.py index 96ab06112..957d3110e 100644 --- a/{{cookiecutter.repo_name}}/config/settings/common.py +++ b/{{cookiecutter.repo_name}}/config/settings/common.py @@ -99,7 +99,7 @@ MANAGERS = ADMINS # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases DATABASES = { # Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ - 'default': env.db("DATABASE_URL", default="postgres://localhost/{{cookiecutter.repo_name}}"), + 'default': env.db("DATABASE_URL", default="postgres://{% if cookiecutter.windows == 'y' %}localhost{% endif %}/{{cookiecutter.repo_name}}"), } DATABASES['default']['ATOMIC_REQUESTS'] = True