Pretty template error pages

Posted by Adrian Holovaty on November 23, 2005

Thanks to Django ninja Robert Wittams and our resident design guru Wilson Miner, Django now has pretty error pages for template syntax errors.

You probably already know that Django displays pretty error pages for tracebacks if your DEBUG setting is set to True. We added this about a week ago.

Now, we've added a TEMPLATE_DEBUG setting. Set it to True, and the pretty error pages will display a relevant template snippet, with the offending line highlighted, for any TemplateSyntaxError.

Of course, note this change applies to the Django development version. It'll be rolled into 0.91 when that's released.

Back to Top