reviewboard.reviews.views.bug_trackers¶
Views for interacting with bug trackers.
- class BugInfoboxView(**kwargs)[source]¶
Bases:
ReviewRequestViewMixin
,TemplateView
Displays information on a bug, for use in bug pop-up infoboxes.
This is meant to be embedded in other pages, rather than being a standalone page.
- get(request: HttpRequest, bug_id: str, **kwargs) HttpResponse [source]¶
Handle HTTP GET requests for this view.
- Parameters:
request (
django.http.HttpRequest
) – The HTTP request from the client.bug_id (
str
) – The ID of the bug to view.*args (
tuple
) – Positional arguments passed to the handler.**kwargs (
dict
) – Keyword arguments passed to the handler.
- Returns:
The HTTP response to send to the client.
If details on a bug could not be found or fetching bug information is not supported, this will return a a HTTP 404 Not Found.
- Return type:
- normalize_text(text: str, text_format: str) SafeString [source]¶
Normalize the text for display.
Based on the text format, this will sanitize and normalize the text so it’s suitable for rendering to HTML.
HTML text will have tags stripped away and certain common entities replaced.
Markdown text will be rendered using our default Markdown parser rules.
Plain text (or any unknown text format) will simply be escaped and wrapped, with paragraphs left intact.
- Parameters:
- Returns:
The resulting text, safe for rendering in HTML.
- Return type:
- __annotations__ = {}¶
- class BugURLRedirectView(**kwargs)[source]¶
Bases:
ReviewRequestViewMixin
,View
Redirects the user to an external bug report.
- get(request: HttpRequest, bug_id: str, **kwargs) HttpResponse [source]¶
Handle HTTP GET requests for this view.
- Parameters:
request (
django.http.HttpRequest
) – The HTTP request from the client.bug_id (
str
) – The ID of the bug report to redirect to.*args (
tuple
) – Positional arguments passed to the handler.**kwargs (
dict
) – Keyword arguments passed to the handler.
- Returns:
The HTTP response redirecting the client.
- Return type:
- __annotations__ = {}¶