Salim Fadhley wrote:
> yml,
> 
> If I want to disable this behavior, is it possible? When a template
> tries to reference an invalid object (e.g. a context variable which
> has not been defined) I'd like to throw an exception. I do not want to
> invent a value.

In my test_settings.py file I put

TEMPLATE_STRING_IF_INVALID = "test_oops_test"

I've subclassed Django's UnitTest.assertTemplateUsed to fail (with 
appropriate message) if it finds that text in the rendered html. And, of 
course, there are unittests that "exercise" all my views and their 
variations.

Not exactly what you are asking for but I find it better to fail 
unittests than throw exception at runtime.

Alternatively or in addition you could set your production settings.py 
to something like,

TEMPLATE_STRING_IF_INVALID = "this is a bug please email 
[EMAIL PROTECTED]"

-- 
Norman J. Harman Jr.
Technology Solutions Group, Austin American-Statesman
___________________________________________________________________________
Get out and about this spring with the Statesman! In print and online,
the Statesman has the area's Best Bets and recreation events.
Pick up your copy today or go to statesman.com 24/7.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to