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.
My application prints financial reports - it's important to make a distinction between missing data and intentionally blank spaces. :-) On Apr 18, 7:46 pm, yml <[EMAIL PROTECTED]> wrote: > Hello, > Here it is an extract form the documentation : > """ > 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 > """ > It looks like it does what you want. > --yml > > On Apr 18, 8:34 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > You could write a simple template tag that did this. > > > On Apr 18, 12:26 pm, Salim Fadhley <[EMAIL PROTECTED]> wrote: > > > > I'm trying to debug the context that is passed into the template. When > > > I render the template I use a command like: > > > > return HttpResponse( render_to_string('mtmreport/index.html'), > > > myContext ) > > > > Is it possible to write something in the template that simply prints > > > out the myContext object? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---