Add new template loaders for conditional caching and namespaced apps.

Review Request #6070 — Created July 7, 2014 and submitted

Information

Djblets
release-0.8.x
4b0c2af...

Reviewers

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.

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/template/loaders/namespaced_app_dirs.py
        djblets/template/loaders/conditional_cached.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/template/loaders/namespaced_app_dirs.py
        djblets/template/loaders/conditional_cached.py
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.8.x (5348e89)