Add new template loaders for conditional caching and namespaced apps.
Review Request #6070 — Created July 7, 2014 and submitted — Latest diff uploaded
This adds two new template loaders intended to directly replace standard
Django template ones.The new 'conditional_cached' template loader functions like Django's
'cached' loader, but does not cache if DEBUG is True. This helps a lot
with development, since it's no longer necessary to reload the server
after modifying a template.The new 'namespaced_app_dirs' template loader is like Django's
'app_directories' loader, but accepts an optional namespace prefix in
the form of 'app.path:'. If specified, the list of template directories
will be limited to those owned by the given app path.
Tested both of these with Review Board. I didn't have caching issues in
development anymore, and was able to look up by namespace when extending
a template.