Skip to content

Instantly share code, notes, and snippets.

@jedie
Created June 21, 2011 10:56
Show Gist options
  • Save jedie/1037619 to your computer and use it in GitHub Desktop.
Save jedie/1037619 to your computer and use it in GitHub Desktop.
DEBUG = True
if DEBUG:
from django.contrib.messages import constants as message_constants
MESSAGE_LEVEL = message_constants.DEBUG
# A boolean that turns on/off template debug mode. If this is True, the fancy
# error page will display a detailed report for any TemplateSyntaxError.
# Note that Django only displays fancy error pages if DEBUG is True!
TEMPLATE_DEBUG = DEBUG
if TEMPLATE_DEBUG:
# Display invalid (e.g. misspelled, unused) template variables
# http://www.djangoproject.com/documentation/templates_python/#how-invalid-variables-are-handled
# http://www.djangoproject.com/documentation/settings/#template-string-if-invalid
TEMPLATE_STRING_IF_INVALID = "XXX INVALID TEMPLATE STRING '%s' XXX"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment