#12064: Impossible to conditionally include potentially non-existant templates ----------------------------+----------------------------------------------- Reporter: mkruisselbrink | Owner: nobody Status: new | Milestone: Component: Uncategorized | Version: 1.1 Keywords: | Stage: Unreviewed Has_patch: 0 | ----------------------------+----------------------------------------------- It is not possible to conditionally include one template in another template, if the template to include might not exist. The include tag will raise an exception if the template does not exist (and is specified as a string literal, not a variable) even if the actual include tag will never be rendered because a surrounding if statement has a false condition. This can easily be fixed by moving the get_template call from `ConstantIncludeNode.__init__` to it's render method.
-- Ticket URL: <http://code.djangoproject.com/ticket/12064> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---