James Bennett wrote:
>> TEMPLATE_STRING_IF_INVALID: The zen of python: "Errors should never pass
>> silently.". I want an exception if the template can't resolve a variable.
> 
> "Unless explicitly silenced." Django goes out of its way to advertise
> that certain types of template errors will result in an empty string
> rather than an exception (and note that many exceptions only get
> "silenced" when DEBUG = False). The reasoning behind this is that, in
> production, it's often better to have an empty string come back to the
> template than to have your entire site go down.

I must say that I somewhat agree with the original poster though:

there should be a clear way to trigger exceptions when non-existing 
variables are added to the templates.

Case in point:
<a href="{{somevar}}">...</a>
<div style="{{somevar}}">...</div>
etc etc

Or: http://code.djangoproject.com/ticket/2583

In all these places it might not be immediately apparent there's an 
actual missing variable until you view the source. This is no good.


  - bram

--~--~---------~--~----~------------~-------~--~----~
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