This tries to bring Django support up to 1.10 without changing behavior in older versions of Django.
The one functionality change here is that TEMPLATE_DEBUG is no longer respected (we instead look directly at DEBUG in this branch):
The general pattern for people before 1.8 was to do TEMPLATE_DEBUG = DEBUG
after 1.8, this becomes an option on the template backend, so there's no longer the "obvious" source for this value
So how does the Django Template Language do it? The render nodes are able to recover the template through the context, get the engine, and find the debug setting there. Unfortunately, a lot of tests operate outside the normal rendering flow (where we render nodes without the proper template context), so trying to do the same caused a lot of test breakage.
Would love it if there was a proper solution to this, I'm not confident enough in my understanding of the template stack to make the test changes required while ensuring the right things are still being tested.
This tries to bring Django support up to 1.10 without changing behavior in older versions of Django.
The one functionality change here is that
TEMPLATE_DEBUG
is no longer respected (we instead look directly atDEBUG
in this branch):TEMPLATE_DEBUG = DEBUG
So how does the Django Template Language do it? The render nodes are able to recover the template through the context, get the engine, and find the debug setting there. Unfortunately, a lot of tests operate outside the normal rendering flow (where we render nodes without the proper template context), so trying to do the same caused a lot of test breakage.
Would love it if there was a proper solution to this, I'm not confident enough in my understanding of the template stack to make the test changes required while ensuring the right things are still being tested.