On Mon, Apr 21, 2008 at 1:06 PM, Peter Rowell <[EMAIL PROTECTED]> wrote: > From http://www.djangoproject.com/documentation/templates/#variables > > If you use a variable that doesn't exist, the template system will > insert the value of the TEMPLATE_STRING_IF_INVALID setting, which is > set to '' (the empty string) by default. > > So you could at least define this to be something more eye catching. > > Part of the problem is that the variable reference syntax a) is not > python, and b) is ambiguous because of all the different ways > foo.bar.mumble can be resolved. If you look at > django.template.__init__, class Variable, the routines __init__(), > resolve(), and _resolve_lookup do a lot of try:ing to guess what value > you meant. The result is that any "obvious" error you might expect > gets eaten in the process. > > A possible alternative is to use a custom tag (E.g. > http://www.djangosnippets.org/snippets/9/) where you can do a full-on > python expression and let the exception hit the fan. This is what I do > for those real head scratchers.
Good information. That's exactly it, I would want a stack trace during development, but probably blank or something else in production. -Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

