Detecting unset variables in Django templates
Are you looking for this? http://docs.djangoproject.com/en/1.1/ref/templates/api/#invalid-template-variables
Have you tried setting TEMPLATE_STRING_IF_INVALID
? e.g.,
TEMPLATE_STRING_IF_INVALID = 'DEBUG WARNING: template variable [%s] is not defined'
That will cause that string to be printed in the rendered html for each spot where an undefined variable was referenced, along with the variable name.
Read this: http://docs.djangoproject.com/en/1.1/ref/settings/#setting-TEMPLATE_STRING_IF_INVALID