Add template hooks to email (html and text)
Review Request #8587 — Created Jan. 2, 2017 and submitted
The two new hooks (one for html and one for text) can be used to add similar information as what can be added to the review request pages using the review-summary-header-pre/post template hooks. The template hook requires the Django request object so that is now passed in the review_published signal.
Tested using an extension with template hooks for the new hooks. The hooks succesfully added information from the review extra_data field to the mail (both text and html).
Description | From | Last Updated |
---|---|---|
'formataddr' imported but unused |
reviewbot | |
We should call this request, just to be consistent throughout the codebase. |
david | |
http_request -> request |
david | |
Needs a trailing comma. |
david | |
http_request -> request. |
david | |
http_request -> request. Maybe also rewrap this so providing_args=[...] is on its own line, indented 4 spaces? |
david |
- Change Summary:
-
Remove unused import.
- Commit:
-
08e8bfff9fdbbc1bb16129d1daa843003e7b7a6d427ce6f1c34405b520aa08d9dbf3ce2110fb7f6e
- Diff:
-
Revision 2 (+40 -12)
-
Tool: Pyflakes Processed Files: reviewboard/notifications/email.py reviewboard/webapi/resources/base_review.py reviewboard/reviews/models/review.py reviewboard/reviews/signals.py Ignored Files: reviewboard/templates/notifications/review_email.txt reviewboard/templates/notifications/review_email.html docs/manual/extending/extensions/hooks/template-hook.rst Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/email.py reviewboard/webapi/resources/base_review.py reviewboard/reviews/models/review.py reviewboard/reviews/signals.py Ignored Files: reviewboard/templates/notifications/review_email.txt reviewboard/templates/notifications/review_email.html docs/manual/extending/extensions/hooks/template-hook.rst
- Change Summary:
-
Fix review comments.
- Commit:
-
427ce6f1c34405b520aa08d9dbf3ce2110fb7f6e7eb88e91e0536b6bf0e112af25b8d4bfa29956da
- Diff:
-
Revision 3 (+41 -13)
-
Tool: Pyflakes Processed Files: reviewboard/notifications/email.py reviewboard/webapi/resources/base_review.py reviewboard/reviews/models/review.py reviewboard/reviews/signals.py Ignored Files: reviewboard/templates/notifications/review_email.txt reviewboard/templates/notifications/review_email.html docs/manual/extending/extensions/hooks/template-hook.rst Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/email.py reviewboard/webapi/resources/base_review.py reviewboard/reviews/models/review.py reviewboard/reviews/signals.py Ignored Files: reviewboard/templates/notifications/review_email.txt reviewboard/templates/notifications/review_email.html docs/manual/extending/extensions/hooks/template-hook.rst