- Change Summary:
-
Just fixed some indentation issues.
Checklist Extension and Template Hook
Review Request #4718 — Created Oct. 10, 2013 and discarded
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_conley | |
I'm not sure this review request specific add-on hook is required. Template hooks allow us to apply templates to named … |
mike_conley |
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
Ignored Files:
reviewboard/templates/reviews/ui/base.html
-
Hey Elaine,
I'm not 100% sure this hook is necessary - see below.
-Mike
-
-
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.