Allow TemplateHooks to choose how they want to render contents.

Review Request #4171 — Created May 25, 2013 and submitted

Information

Djblets
master

Reviewers

Allow TemplateHooks to choose how they want to render contents.

TemplateHooks could previously only supply a template_name, and nothing
else, for rendering. This severely limited them.

Now, rendering is handled in TemplateHook's render_to_string function.
By default, this will simply render the provided template, but an
extension can subclass TemplateHook and override this.

Also, template_name is now an optional parameter.
Tested with an extension I'm developing. I was able to provide my own
logic.
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        djblets/extensions/templatetags/djblets_extensions.py
        djblets/extensions/hooks.py
      Ignored Files:
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (b1b1589)
Loading...