James Bennett wrote: > On 5/11/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: >> there should be a clear way to trigger exceptions when non-existing >> variables are added to the templates. > > Again, the reasoning is that it's better to have an empty string (or > TEMPLATE_STRING_IF_INVALID, if set) come back than to throw exceptions > in this situation; if you mistype a variable name in a base template, > do you really want every page of your site throwing "Internal Server > Error" pages until you track it down? This is why the > TEMPLATE_STRING_IF_INVALID setting exists (and why its use is > recommended only for debugging purposes) -- it's a compromise between > "completely silent failure" and "a typo in a template brings your site > down".
I completely agree - for a live site, but not for development! But this could be easily solved by: THROW_EXCEPTION_WHEN_TEMPLATE_STRING_INVALID default to False You also don't want to see error dumps on a live site, so you have to set DEBUG = False when deploying. This follows the same pattern. - 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 -~----------~----~----~----~------~----~------~--~---