chore(config): makes debug=False in production

* Make debug=False by default and enable it only
  in Local/Development environment.

Fixes: https://github.com/pydanny/cookiecutter-django/issues/75
This commit is contained in:
Saurabh Kumar 2014-03-22 23:29:11 +05:30
parent 1ad866770a
commit 5c7fa4933b

View File

@ -81,7 +81,7 @@ class Common(Configuration):
########## DEBUG ########## DEBUG
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = values.BooleanValue(True) DEBUG = values.BooleanValue(False)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
@ -275,6 +275,11 @@ class Common(Configuration):
class Local(Common): class Local(Common):
########## DEBUG
DEBUG = values.BooleanValue(True)
TEMPLATE_DEBUG = DEBUG
########## END DEBUG
########## INSTALLED_APPS ########## INSTALLED_APPS
INSTALLED_APPS = Common.INSTALLED_APPS INSTALLED_APPS = Common.INSTALLED_APPS
########## END INSTALLED_APPS ########## END INSTALLED_APPS
@ -326,7 +331,7 @@ class Production(Common):
########## SITE CONFIGURATION ########## SITE CONFIGURATION
# Hosts/domain names that are valid for this site # Hosts/domain names that are valid for this site
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts # See https://docs.djangoproject.com/en/1.6/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ["*"] ALLOWED_HOSTS = ["*"]
########## END SITE CONFIGURATION ########## END SITE CONFIGURATION