﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27794	Fix confusing error messages for broken `context_processors`	Elena Williams		"If there is something broken about one or many items in `context_processors` produces the error message:

{{{
No module named context_processors
}}}

A better error message would say that an item was broken, not that the module doesn't exist (it usually does exist). 

Preferably mention which item is broken.

This is confusing when either `TEMPLATES['OPTIONS']['context_processors']` or `TEMPLATE_CONTEXT_PROCESSORS` ''do'' exist. Particularly when upgrading or when the `context_processors` list is quite long.


Can be trivially replicated by starting a new project and adding any syntactically correct, but otherwise broken entry to `context_processors` list, for example:

{{{
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'broken.context_processors',
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]
}}}

Examples of this having confused users is discussed:
http://stackoverflow.com/questions/32828536/django-no-module-named-context-processors-error-after-reboot
http://stackoverflow.com/questions/38772498/importerror-no-module-named-context-processors


"	Uncategorized	closed	Error reporting	1.10	Normal	needsinfo	errors, context_processors		Unreviewed	0	0	0	0	0	0
