On Wed, 2008-05-14 at 19:00 +0400, Ivan Sagalaev wrote:
> Simon Willison wrote:
> > {{ article.something.title }} - outputs text if article is there,
> > fails silently otherwise
> > 
> > Which leaves us in a tricky situation. A global settings.py variable
> > for "throw errors on missing template variables" is a bad idea as it
> > kills application portability
> 
> It doesn't if we clearly document that silent beahviour is for 
> production and breakage is for debug. This setting won't travel with 
> application code but will be right alongside DEBUG in settings. Actually 
> there is such setting: TEMPLATE_DEBUG. We can just add this braking 
> effect to it. I believe it's pretty intuitive.
> 

-1

I'm a fairly strong -1 on adding this across the board to debug
behavior, especially if it causes the template not to render.  If having
a variable missing is expected behavior in some cases, and should result
in nothing being inserted,  (and it frequently is for me) then causing
the page to break will make actual debugging impossible. 

On the other hand, I'm +1 on the idea of having a filter to mark a
variable as required. 

Cheers,
Cliff



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to