Checklist Extension and Template Hook

Review Request #4718 — Created Oct. 10, 2013 and discarded

Information

Review Board
master

Reviewers

I generated an extension for checklist. So far, the only additions to the minimum structure are the instantiation of the URLHook and TemplateHook in extension.py. I also created a base.html file in templates/checklist directory, and added a template hook in "reviewboard/templates/reviews/ui/base.html".

So far just visual testing, checking to see if my template gets rendered or not.

Description From Last Updated

We can probably do away with this newline.

mike_conleymike_conley

I'm not sure this review request specific add-on hook is required. Template hooks allow us to apply templates to named …

mike_conleymike_conley
LE
LE
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    Ignored Files:
    reviewboard/templates/reviews/ui/base.html

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    Ignored Files:
    reviewboard/templates/reviews/ui/base.html

  2. 
      
mike_conley
  1. Hey Elaine,

    I'm not 100% sure this hook is necessary - see below.

    -Mike

  2. Show all issues

    We can probably do away with this newline.

  3. Show all issues

    I'm not sure this review request specific add-on hook is required.

    Template hooks allow us to apply templates to named templates if we'd like - so we should be able to do:

    TemplateHook(self, "base-scripts-post", "checklist/template.html", apply_to=["view_diff", "view_diff_revision"])

    That base-scripts-post hook is in templates/base.html, and injects your script at the very bottom of the document.

    The strings in "apply_to" are where we're selecting which pages to show the template on - we're using the names defined in reviews/urls.py to specify which URLs get the template.

    If we can do that, I'm not sure this new hook is necessary.

  4. 
      
LE
Review request changed

Status: Discarded

Change Summary:

Hey Elaine, as you've switched from using this hook, I've gone ahead and marked this review request as discarded.
Loading...