reviewboard.reviews.views.review_request_detail¶
Main review request page view.
- class ReviewRequestDetailView(**kwargs)[source]¶
Bases:
ReviewRequestViewMixin
,UserProfileRequiredViewMixin
,ETagViewMixin
,TemplateView
A view for the main review request page.
This page shows information on the review request, all the reviews and issues that have been posted, and the status updates made on uploaded changes.
- __init__(**kwargs) None [source]¶
Initialize a view for the request.
- Parameters:
**kwargs (
dict
) – Keyword arguments passed toas_view()
.
- get_etag_data(request: HttpRequest, *args, **kwargs) str [source]¶
Return an ETag for the view.
This will look up state needed for the request and generate a suitable ETag. Some of the information will be stored for later computation of the template context.
- Parameters:
request (
django.http.HttpRequest
) – The HTTP request from the client.*args (
tuple
, unused) – Positional arguments passsed to the handler.**kwargs (
dict
, unused) – Keyword arguments passed to the handler.
- Returns:
The ETag for the page.
- Return type:
- track_review_request_visit() Tuple[Optional[ReviewRequestVisit], Optional[datetime]] [source]¶
Track a visit to the review request.
If the user is authenticated, their visit to this page will be recorded. That information is used to provide an indicator in the dashboard when a review request is later updated.
- Returns:
A tuple containing the following items:
- Tuple:
0 (
reviewboard.accounts.models.ReviewRequestVisit
) – The resulting visit object, if the user is authenticated and the visit could be created or updated.1 (
datetime.datetime
) – The timestamp when the user had last visited the review request, prior to this visit (orNone
if they haven’t).
- Return type:
- is_review_request_starred() bool [source]¶
Return whether the review request has been starred by the user.
- Returns:
True
if the user has starred the review request.False
if they have not.- Return type:
- get_context_data(**kwargs) Dict[str, Any] [source]¶
Return data for the template.
This will return information on the review request, the entries to show, file attachments, issues, metadata to use when sharing the review request on social networks, and everything else needed to render the page.
- __annotations__ = {}¶