Ask Your Question
1

TEMPLATE_DEBUG warning messages?

asked 2017-12-19 11:09:00 -0500

Chris Curvey gravatar image

updated 2019-03-13 08:52:21 -0500

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2017-12-19 11:40:00 -0500

updated 2019-03-07 08:39:29 -0500

Wingware Admin gravatar image

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:

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        'debug': True,
        },
    },
]
edit flag offensive delete link more

Comments

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

Chris Curvey gravatar imageChris Curvey ( 2017-12-19 12:26:00 -0500 )edit

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.

Wingware Support gravatar imageWingware Support ( 2017-12-19 13:16:00 -0500 )edit

Ah, that was it.  Thanks!

Chris Curvey gravatar imageChris Curvey ( 2017-12-19 15:03:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-12-19 11:09:00 -0500

Seen: 147 times

Last updated: Mar 07