Convert the review request page's view to a class-based view.
Review Request #9001 — Created June 6, 2017 and submitted
The review request page is complex, with a lot of information being calculated and used to compute ETags and render the pages. As we iterate on the capabilities of this page, the view just gets more and more complicated. This change rewrites the view as a class-based view, making use of a handy new mixin for review request pages (such as the diff viewer and file attachment review pages -- though none of those use this mixin yet). This view contains versions of the handy private functions used to look up review requests and diffs, check for access permissions, and perform common template context calculations. The new view breaks up some of the logic into helper methods. It's better organized and can be expanded later in a more clean way. Future changes will move more classes to the new mixin and to class-based views.
Tested that the review request page works. Tested actions, file
file attachments, reviews, status updates, replies, editing the
review request, and tracking visited state.
- Change Summary:
-
Added an
__init__
that sets default variable states. - Commit:
-
8576cada26beffdcad74e75d57801d641e92c8225049cf425d47f750067c05ffe3a45d555a65a8b7
- Diff:
-
Revision 2 (+504 -178)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Change Summary:
-
Changed the default implementation of
ReviewRequestViewMixin.get_context_data
to be more generally useful. - Commit:
-
5049cf425d47f750067c05ffe3a45d555a65a8b7d69a3b7d030c0d5758a3c8e5eaa4609dd39618c2
- Diff:
-
Revision 3 (+502 -178)
Checks run (1 failed, 1 succeeded)
flake8
failed.
JSHint
passed.
flake8
- Change Summary:
-
Failed to
git add
a line. - Commit:
-
d69a3b7d030c0d5758a3c8e5eaa4609dd39618c21b11259a82ce7931964d525ec23968fd11a0e344
- Diff:
-
Revision 4 (+502 -178)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Change Summary:
-
Fixed some documented types.
- Commit:
-
1b11259a82ce7931964d525ec23968fd11a0e3440e8b8019ed0d40e797d06d4a1ca988dfd90fcd03
- Diff:
-
Revision 5 (+502 -178)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.