Pre-defined URL Names¶
Most URLs in Review Board have a name that can be referenced, making it easy to link to the right pages in your extensions.
These are often used with:
local_site_reverse(), which returns a URL for a name, values to plug into the URL, and an optional Local Site orHttpRequest.(Despite the name, this is not specific to Local Sites, and is recommended for URL resolution over
django.urls.reverse().)The
{% url %}template tag.apply_tolists, used by several parts of our extension infrastructure, for applying customizations only to certain pages.For example, this can be used in:
Some of the most common URL names you might want to use include:
|
The Dashboard page. |
|
The file attachment review UI pages (note that this will apply to all types of file attachments with review UIs!). |
|
The login page. |
|
The user registration page. |
|
The review request page itself, where discussion is shown. |
|
The root of the Review Board server. |
|
The My Account page. |
There are also lists of URL names that can be useful when applying something (such as static media) to specific pages:
All pages for the review request and reviewable content (diffs and file attachments). |
|
All the diff viewer pages. |
|
All the review request and diff viewer pages. |
|
All pages for reviewable content (diffs and file attachments),
but not review requests ( |
You can look at the Review Board codebase reference for all the URL names (they’ll be listed in the
*.urls modules).