TEMPLATE_DEBUG warning messages?

4 months ago by
I use Wing to work on my Django projects, and I have dutifully set TEMPLATE_DEBUG in my settings file.  Does anyone know how to suppress this error message that I get every time any Django process starts?

The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DEBUG.
Community: Wing Python IDE

1 Answer

4 months ago by
In the TEMPLATES  section of your settings.py you want to add a line that says "'debug': True,"

Wing's project setup scripts should be doing that for Django >= 1.9 instead of setting TEMPLATE_DEBUG.

Here's an example that works for me with Django 1.11:

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
        'debug': True,
Hmm, I'm on Django 1.11 -- when I do that, I don't get a warning message on startup, but when I render a template, I get:

ImproperlyConfigured: Unknown parameters: debug
written 4 months ago by Chris Curvey  
Are you sure the 'debug: True line is inside the OPTIONS dict?  In the above, the indentation is wrong and makes it look like it's within the top-level dict instead, but it's part of the dict after OPTIONS.
written 4 months ago by Wingware Support  
Ah, that was it.  Thanks!
written 4 months ago by Chris Curvey  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »