• Get Review Board
  • What's New
  • Products
  • Review Board Code review, image review, and document review
  • Documentation
  • Release Notes
  • Power Pack Enterprise integrations, reports, and enhanced document review
  • Try for 60 Days
  • Purchase
  • RBCommons Review Board as a Service, hosted by us
  • Pricing
  • RBTools Command line tools and Python API for Review Board
  • Documentation
  • Release Notes
  • Review Bot Automated code review, connecting tools you already use
  • Documentation
  • Release Notes
  • RB Gateway Manage Git and Mercurial repositories in your network
  • Documentation
  • Release Notes
  • Learn and Explore
  • What is Code Review?
  • Documentation
  • Frequently Asked Questions
  • Support Options
  • Third-Party Integrations
  • Demo
  • Review Board RBTools Power Pack Review Bot Djblets RB Gateway
    1. Review Board 7.x
    2. Version 7.x
    3. Version 6.x
    4. Version 5.0
    5. Version 4.0
    6. Version 3.0
    7. Version 2.5
    8. Version 2.0
    9. Version 1.7
    10. Version 1.6
    11. Version 1.5
    12. Version 1.0
    13. Extending Review Board
    14. Module and Class References
    15. reviewboard.reviews.ui.base
  • Home
  • Users Guide
  • Getting Started
  • Introduction
  • What is Code Review?
  • Review Board Workflows
  • Account Settings
  • Dashboard
  • Working with Review Requests
  • Overview
  • Creating Review Requests
  • Editing Fields
  • Uploading Diffs
  • Uploading File Attachments
  • Publishing Review Requests
  • Closing Review Requests
  • Reviewing
  • Reviews and Comments
  • The Review Banner
  • Managing and Publishing Drafts
  • Issue Tracking
  • Reviewing Code (Diffs)
  • Reviewing File Attachments
  • Reviewing Images
  • Reviewing Markdown Files
  • Reviewing Text Files
  • Creating and Editing Reviews
  • Approving Changes (Ship It!)
  • Replying to Comments
  • Automated Code Reviews
  • Searching
  • Quick Search
  • Full-Text Search
  • Using Markdown
  • Administration Guide
  • Installation
  • Installing Review Board
  • Linux System Compatibility
  • Installing with Docker
  • Manually Installing on Linux
  • Installing on macOS
  • Installing on Windows
  • Installing Development Releases
  • Creating a Review Board Site
  • Upgrading
  • Upgrading Review Board
  • Upgrading Review Board Sites
  • Optimization
  • Optimizing and Scaling Review Board
  • Administration UI
  • Overview of the Administration UI
  • Administrator Dashboard
  • Database Management
  • Configuration
  • Site Settings
  • General Settings
  • Authentication Settings
  • Avatar Services Settings
  • E-Mail Settings
  • Diff Viewer Settings
  • Logging Settings
  • SSH Settings
  • File Storage Settings
  • User Privacy Settings
  • Search Settings
  • Access Control
  • Working with E-Mail
  • Default Reviewers
  • Permission Groups
  • Repositories
  • Bazaar Repositories
  • CVS Repositories
  • Git Repositories
  • HCL VersionVault and IBM ClearCase
  • Mercurial Repositories
  • Perforce Repositories
  • Subversion Repositories
  • Assembla Repositories
  • AWS CodeCommit Repositories
  • Beanstalk Repositories
  • Bitbucket Repositories
  • Bitbucket Server Repositories
  • Codebase HQ Repositories
  • Fedora Hosted Repositories
  • Gerrit Repositories
  • GitHub Repositories
  • GitHub Enterprise Repositories
  • GitLab Repositories
  • Gitorious Repositories
  • Cliosoft SOS Repositories
  • SourceForge Repositories
  • Unfuddle STACK Repositories
  • VisualStudio.com Repositories
  • Review Groups
  • Users
  • WebHooks
  • Extensions
  • Integrations
  • Asana Integration
  • CircleCI Integration
  • Discord Integration
  • I Done This Integration
  • Jenkins CI Integration
  • Matrix Integration
  • Mattermost Integration
  • Microsoft Teams Integration
  • Slack Integration
  • Travis CI Integration
  • Trello Integration
  • Site Maintenance
  • The rb-site Tool
  • Advanced Management Commands
  • Monitoring Review Board
  • Health Checks
  • Web API Guide
  • Resource Tree
  • Resources
  • Root List Resource
  • Default Reviewer List Resource
  • Default Reviewer Resource
  • Extension List Resource
  • Extension Resource
  • Hosting Service Account List Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Hosting Service List Resource
  • Hosting Service Resource
  • OAuth2 Applications List Resource
  • OAuth2 Applications Resource
  • OAuth2 Tokens List Resource
  • OAuth2 Tokens Resource
  • Repository List Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Info Resource
  • Repository User List Resource
  • Review Group List Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Request List Resource
  • Review Request Resource
  • Change List Resource
  • Diff Context Resource
  • Diff List Resource
  • File Attachment List Resource
  • Review List Resource
  • Review Request Draft Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Status Update List Resource
  • Root Diff Comment List Resource
  • Root File Attachment Comment List Resource
  • Root General Comment List Resource
  • Root Review List Resource
  • Search Resource
  • Server Info Resource
  • Session Resource
  • User List Resource
  • User Resource
  • API Token List Resource
  • Archived Review Request List Resource
  • Muted Review Request List Resource
  • User File Attachment List Resource
  • Watched List Resource
  • Validation List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • WebHook List Resource
  • WebHook Resource
  • Server Info Resource
  • Default Reviewer List Resource
  • Default Reviewer Resource
  • Default Reviewer Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • File Diff List Resource
  • File Diff Resource
  • Diff Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • File Diff List Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • Diff Commit Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Diff File Attachment Resource
  • Original File Resource
  • Patched File Resource
  • Extension List Resource
  • Extension Resource
  • Extension Resource
  • Hosting Service List Resource
  • Hosting Service Resource
  • Hosting Service Resource
  • Hosting Service Account List Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Remote Repository Resource
  • OAuth2 Applications List Resource
  • OAuth2 Applications Resource
  • OAuth2 Applications Resource
  • OAuth2 Tokens List Resource
  • OAuth2 Tokens Resource
  • OAuth2 Tokens Resource
  • Repository List Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository User Resource
  • Review Group List Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group User Resource
  • Change List Resource
  • Change Resource
  • Change Resource
  • File Attachment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • File Attachment Comment List Resource
  • File Diff List Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • File Diff Comment List Resource
  • Review Request List Resource
  • Review Request Resource
  • Change List Resource
  • Change Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • File Attachment List Resource
  • File Attachment Resource
  • Review List Resource
  • Review Resource
  • Review Draft Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft File Attachment List Resource
  • Draft Screenshot List Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Status Update List Resource
  • Status Update Resource
  • Review Request Resource
  • Change List Resource
  • Change Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • Diff Commit List Resource
  • File Diff List Resource
  • File Attachment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • Review List Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review File Attachment Comment List Resource
  • Review General Comment List Resource
  • Review Reply List Resource
  • Review Screenshot Comment List Resource
  • Review Draft Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Status Update List Resource
  • Status Update Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Screenshot Comment List Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft File Attachment Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Draft Screenshot Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft File Diff List Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Root Review List Resource
  • Root Diff Comment List Resource
  • Root File Attachment Comment List Resource
  • Root General Comment List Resource
  • Review List Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Draft Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Draft Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply General Comment List Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Draft Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Draft Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review General Comment Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Screenshot Comment Resource
  • Review Reply Draft Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Draft Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Screenshot Comment Resource
  • Search Resource
  • Status Update List Resource
  • Status Update Resource
  • Status Update Resource
  • API Token List Resource
  • API Token Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • Muted Review Request Resource
  • Session Resource
  • User List Resource
  • User Resource
  • API Token List Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Request List Resource
  • User Resource
  • API Token List Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • User File Attachment Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • Watched Review Request Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • Validation List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • WebHook List Resource
  • WebHook Resource
  • WebHook Resource
  • Errors
  • 100 - Does Not Exist
  • 101 - Permission Denied
  • 102 - Invalid Attribute
  • 103 - Not Logged In
  • 104 - Login Failed
  • 105 - Invalid Form Data
  • 106 - Missing Attribute
  • 107 - Enable Extension Failed
  • 108 - Disable Extension Failed
  • 109 - Extension Already Installed
  • 110 - Install Extension Failed
  • 111 - Duplicate Item
  • 112 - OAuth2 Missing Scope Error
  • 113 - OAuth2 Access Denied Error
  • 114 - Rate Limit Exceeded
  • 203 - Invalid Change Number
  • 204 - Change Number In Use
  • 205 - Missing Repository
  • 206 - Invalid Repository
  • 207 - Repository File Not Found
  • 208 - Invalid User
  • 209 - Repository Action Not Supported
  • 210 - Repository Information Error
  • 212 - Empty Changeset
  • 213 - Server Configuration Error
  • 214 - Bad Host Key
  • 215 - Unverified Host Key
  • 216 - Unverified Host Certificate
  • 217 - Missing User Key
  • 218 - Repository Authentication Error
  • 219 - Diff Empty
  • 220 - Diff Too Big
  • 221 - File Retrieval Error
  • 222 - Hosting Service Authentication Error
  • 223 - Group Already Exists
  • 224 - Diff Parse Error
  • 225 - Publish Error
  • 226 - User Query Error
  • 227 - Commit ID Already Exists
  • 228 - Token Generation Failed
  • 230 - Could not close review request
  • 231 - Could not reopen review request
  • 232 - Ship-It Revocation Error
  • REST API 2.0
  • Overview
  • Authenticating
  • API Token Policies
  • OAuth2 Authentication
  • Rich Text Fields and Types
  • Storing/Accessing Extra Data
  • Resources
  • Root List Resource
  • Default Reviewer List Resource
  • Default Reviewer Resource
  • Extension List Resource
  • Extension Resource
  • Hosting Service Account List Resource
  • Hosting Service Account Resource
  • Hosting Service List Resource
  • Hosting Service Resource
  • OAuth2 Applications List Resource
  • OAuth2 Applications Resource
  • OAuth2 Tokens List Resource
  • OAuth2 Tokens Resource
  • Repository List Resource
  • Repository Resource
  • Review Group List Resource
  • Review Group Resource
  • Review Request List Resource
  • Review Request Resource
  • Root Diff Comment List Resource
  • Root File Attachment Comment List Resource
  • Root General Comment List Resource
  • Root Review List Resource
  • Search Resource
  • Server Info Resource
  • Session Resource
  • User List Resource
  • User Resource
  • Validation List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • WebHook List Resource
  • WebHook Resource
  • Server Info Resource
  • Default Reviewer List Resource
  • Default Reviewer Resource
  • Default Reviewer Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • Diff Commit List Resource
  • File Diff List Resource
  • Diff Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • File Diff List Resource
  • File Diff Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • Diff Commit Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Diff File Attachment Resource
  • Original File Resource
  • Patched File Resource
  • Extension List Resource
  • Extension Resource
  • Extension Resource
  • Hosting Service List Resource
  • Hosting Service Resource
  • Hosting Service Resource
  • Hosting Service Account List Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Remote Repository Resource
  • OAuth2 Applications List Resource
  • OAuth2 Applications Resource
  • OAuth2 Applications Resource
  • OAuth2 Tokens List Resource
  • OAuth2 Tokens Resource
  • OAuth2 Tokens Resource
  • Repository List Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository User Resource
  • Review Group List Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group User Resource
  • Change List Resource
  • Change Resource
  • Change Resource
  • File Attachment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • File Attachment Comment List Resource
  • File Diff List Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • File Diff Comment List Resource
  • Review Request List Resource
  • Review Request Resource
  • Change List Resource
  • Diff Context Resource
  • Diff List Resource
  • File Attachment List Resource
  • Review List Resource
  • Review Request Draft Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Status Update List Resource
  • Review Request Resource
  • Change List Resource
  • Change Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • File Attachment List Resource
  • File Attachment Resource
  • Review List Resource
  • Review Resource
  • Review Draft Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft File Attachment List Resource
  • Draft Screenshot List Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Status Update List Resource
  • Status Update Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Screenshot Comment List Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft File Diff List Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft File Attachment Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Draft Screenshot Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Root Review List Resource
  • Root Diff Comment List Resource
  • Root File Attachment Comment List Resource
  • Root General Comment List Resource
  • Review List Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review File Attachment Comment List Resource
  • Review General Comment List Resource
  • Review Reply List Resource
  • Review Screenshot Comment List Resource
  • Review Draft Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Draft Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Draft Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review General Comment Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Screenshot Comment Resource
  • Review Reply Draft Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply General Comment List Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Draft Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Screenshot Comment Resource
  • Search Resource
  • Status Update List Resource
  • Status Update Resource
  • Status Update Resource
  • API Token List Resource
  • API Token Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • Muted Review Request Resource
  • Session Resource
  • User List Resource
  • User Resource
  • API Token List Resource
  • Archived Review Request List Resource
  • Muted Review Request List Resource
  • User File Attachment List Resource
  • Watched List Resource
  • User Resource
  • API Token List Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Request List Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • User File Attachment Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • Watched Review Request Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • Validation List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • WebHook List Resource
  • WebHook Resource
  • WebHook Resource
  • Errors
  • 100 - Does Not Exist
  • 101 - Permission Denied
  • 102 - Invalid Attribute
  • 103 - Not Logged In
  • 104 - Login Failed
  • 105 - Invalid Form Data
  • 106 - Missing Attribute
  • 107 - Enable Extension Failed
  • 108 - Disable Extension Failed
  • 109 - Extension Already Installed
  • 110 - Install Extension Failed
  • 111 - Duplicate Item
  • 112 - OAuth2 Missing Scope Error
  • 113 - OAuth2 Access Denied Error
  • 114 - Rate Limit Exceeded
  • 203 - Invalid Change Number
  • 204 - Change Number In Use
  • 205 - Missing Repository
  • 206 - Invalid Repository
  • 207 - Repository File Not Found
  • 208 - Invalid User
  • 209 - Repository Action Not Supported
  • 210 - Repository Information Error
  • 212 - Empty Changeset
  • 213 - Server Configuration Error
  • 214 - Bad Host Key
  • 215 - Unverified Host Key
  • 216 - Unverified Host Certificate
  • 217 - Missing User Key
  • 218 - Repository Authentication Error
  • 219 - Diff Empty
  • 220 - Diff Too Big
  • 221 - File Retrieval Error
  • 222 - Hosting Service Authentication Error
  • 223 - Group Already Exists
  • 224 - Diff Parse Error
  • 225 - Publish Error
  • 226 - User Query Error
  • 227 - Commit ID Already Exists
  • 228 - Token Generation Failed
  • 230 - Could not close review request
  • 231 - Could not reopen review request
  • 232 - Ship-It Revocation Error
  • Glossary
  • Extending Review Board
  • Extension Files/Package Layout
  • Creating an Extension Class
  • Extension Configuration
  • Database Models
  • Extension Static Media Files
  • JavaScript Extensions
  • Testing Extensions
  • Extension Distribution
  • Writing Review Board Extensions
  • The rbext Tool
  • Extension Hooks
  • AccountPageFormsHook
  • AccountPagesHook
  • Action Hooks
  • AdminWidgetHook
  • APIExtraDataAccessHook
  • AuthBackendHook
  • AvatarServiceHook
  • CommentDetailDisplayHook
  • DashboardColumnsHook
  • DashboardSidebarItemsHook
  • DataGridColumnsHook
  • EmailHook
  • ReviewRequestPublishedEmailHook
  • ReviewRequestClosedEmailHook
  • ReviewPublishedEmailHook
  • ReviewReplyPublishedEmailHook
  • FileAttachmentThumbnailHook
  • FileDiffACLHook
  • HostingServiceHook
  • IntegrationHook
  • NavigationBarHook
  • ReviewRequestApprovalHook
  • ReviewRequestFieldsHook
  • ReviewRequestFieldSetsHook
  • ReviewUIHook
  • SCMToolHook
  • SignalHook
  • TemplateHook
  • URLHook
  • UserInfoboxHook
  • UserPageSidebarItemsHook
  • WebAPICapabilitiesHook
  • JavaScript Extension Hooks
  • CommentDialogHook
  • FileAttachmentThumbnailContainerHook
  • ReviewDialogCommentHook
  • ReviewDialogHook
  • Adding Review Request Fields
  • Review UI Integration
  • Writing Authentication Backends
  • Writing Legacy Authentication Backends
  • Extending the Web API
  • Module and Class References
  • reviewboard
  • reviewboard.deprecation
  • reviewboard.rb_platform
  • reviewboard.signals
  • reviewboard.accounts.backends
  • reviewboard.accounts.backends.ad
  • reviewboard.accounts.backends.base
  • reviewboard.accounts.backends.http_digest
  • reviewboard.accounts.backends.ldap
  • reviewboard.accounts.backends.nis
  • reviewboard.accounts.backends.registry
  • reviewboard.accounts.backends.standard
  • reviewboard.accounts.backends.x509
  • reviewboard.accounts.decorators
  • reviewboard.accounts.errors
  • reviewboard.accounts.forms.auth
  • reviewboard.accounts.forms.pages
  • reviewboard.accounts.forms.registration
  • reviewboard.accounts.managers
  • reviewboard.accounts.middleware
  • reviewboard.accounts.mixins
  • reviewboard.accounts.models
  • reviewboard.accounts.pages
  • reviewboard.accounts.privacy
  • reviewboard.accounts.templatetags.accounts
  • reviewboard.accounts.testing
  • reviewboard.accounts.testing.queries
  • reviewboard.accounts.trophies
  • reviewboard.actions
  • reviewboard.actions.base
  • reviewboard.actions.errors
  • reviewboard.actions.registry
  • reviewboard.admin
  • reviewboard.admin.admin_sites
  • reviewboard.admin.cache_stats
  • reviewboard.admin.checks
  • reviewboard.admin.decorators
  • reviewboard.admin.form_widgets
  • reviewboard.admin.middleware
  • reviewboard.admin.model_admin
  • reviewboard.admin.security_checks
  • reviewboard.admin.server
  • reviewboard.admin.siteconfig
  • reviewboard.admin.support
  • reviewboard.admin.validation
  • reviewboard.admin.widgets
  • reviewboard.attachments.errors
  • reviewboard.attachments.forms
  • reviewboard.attachments.managers
  • reviewboard.attachments.mimetypes
  • reviewboard.attachments.models
  • reviewboard.avatars.registry
  • reviewboard.avatars.services
  • reviewboard.avatars.settings
  • reviewboard.avatars.templatetags.avatars
  • reviewboard.avatars.testcase
  • reviewboard.changedescs.models
  • reviewboard.datagrids.columns
  • reviewboard.datagrids.grids
  • reviewboard.datagrids.sidebar
  • reviewboard.diffviewer.chunk_generator
  • reviewboard.diffviewer.differ
  • reviewboard.diffviewer.diffutils
  • reviewboard.diffviewer.errors
  • reviewboard.diffviewer.forms
  • reviewboard.diffviewer.managers
  • reviewboard.diffviewer.models
  • reviewboard.diffviewer.models.diffcommit
  • reviewboard.diffviewer.models.diffset
  • reviewboard.diffviewer.models.diffset_history
  • reviewboard.diffviewer.models.filediff
  • reviewboard.diffviewer.models.legacy_file_diff_data
  • reviewboard.diffviewer.models.raw_file_diff_data
  • reviewboard.diffviewer.myersdiff
  • reviewboard.diffviewer.opcode_generator
  • reviewboard.diffviewer.parser
  • reviewboard.diffviewer.processors
  • reviewboard.diffviewer.renderers
  • reviewboard.diffviewer.smdiff
  • reviewboard.certs
  • reviewboard.certs.cert
  • reviewboard.certs.errors
  • reviewboard.extensions.base
  • reviewboard.extensions.hooks
  • reviewboard.extensions.packaging
  • reviewboard.extensions.testing
  • reviewboard.extensions.testing.testcases
  • reviewboard.hostingsvcs.base
  • reviewboard.hostingsvcs.base.client
  • reviewboard.hostingsvcs.base.forms
  • reviewboard.hostingsvcs.base.hosting_service
  • reviewboard.hostingsvcs.base.http
  • reviewboard.hostingsvcs.base.paginator
  • reviewboard.hostingsvcs.base.registry
  • reviewboard.hostingsvcs.base.repository
  • reviewboard.hostingsvcs.errors
  • reviewboard.hostingsvcs.forms
  • reviewboard.hostingsvcs.hook_utils
  • reviewboard.hostingsvcs.models
  • reviewboard.hostingsvcs.repository
  • reviewboard.hostingsvcs.service
  • reviewboard.hostingsvcs.testing
  • reviewboard.hostingsvcs.testing.testcases
  • reviewboard.hostingsvcs.utils.paginator
  • reviewboard.integrations
  • reviewboard.integrations.base
  • reviewboard.integrations.forms
  • reviewboard.integrations.models
  • reviewboard.integrations.urls
  • reviewboard.integrations.views
  • reviewboard.notifications
  • reviewboard.notifications.email
  • reviewboard.notifications.email.backend
  • reviewboard.notifications.email.decorators
  • reviewboard.notifications.email.hooks
  • reviewboard.notifications.email.message
  • reviewboard.notifications.email.utils
  • reviewboard.notifications.email.views
  • reviewboard.notifications.forms
  • reviewboard.notifications.managers
  • reviewboard.notifications.models
  • reviewboard.notifications.webhooks
  • reviewboard.reviews.actions
  • reviewboard.reviews.builtin_fields
  • reviewboard.reviews.chunk_generators
  • reviewboard.reviews.conditions
  • reviewboard.reviews.context
  • reviewboard.reviews.default_actions
  • reviewboard.reviews.detail
  • reviewboard.reviews.errors
  • reviewboard.reviews.features
  • reviewboard.reviews.fields
  • reviewboard.reviews.forms
  • reviewboard.reviews.managers
  • reviewboard.reviews.markdown_utils
  • reviewboard.reviews.models
  • reviewboard.reviews.signals
  • reviewboard.reviews.templatetags.reviewtags
  • reviewboard.reviews.testing
  • reviewboard.reviews.testing.queries
  • reviewboard.reviews.testing.queries.review_groups
  • reviewboard.reviews.testing.queries.review_requests
  • reviewboard.reviews.testing.queries.reviews
  • reviewboard.reviews.ui.base
  • reviewboard.reviews.ui.image
  • reviewboard.reviews.ui.markdownui
  • reviewboard.reviews.ui.text
  • reviewboard.reviews.views.attachments
  • reviewboard.reviews.views.bug_trackers
  • reviewboard.reviews.views.diff_fragments
  • reviewboard.reviews.views.diffviewer
  • reviewboard.reviews.views.download_diff
  • reviewboard.reviews.views.email
  • reviewboard.reviews.views.mixins
  • reviewboard.reviews.views.new_review_request
  • reviewboard.reviews.views.review_request_detail
  • reviewboard.reviews.views.review_request_infobox
  • reviewboard.reviews.views.review_request_updates
  • reviewboard.reviews.views.root
  • reviewboard.scmtools.certs
  • reviewboard.scmtools.conditions
  • reviewboard.scmtools.core
  • reviewboard.scmtools.crypto_utils
  • reviewboard.scmtools.errors
  • reviewboard.scmtools.forms
  • reviewboard.scmtools.managers
  • reviewboard.scmtools.models
  • reviewboard.scmtools.signals
  • reviewboard.scmtools.testing
  • reviewboard.scmtools.testing.queries
  • reviewboard.scmtools.tests.testcases
  • reviewboard.search.fields
  • reviewboard.search.forms
  • reviewboard.search.indexes
  • reviewboard.search.search_backends.base
  • reviewboard.search.search_backends.elasticsearch
  • reviewboard.search.search_backends.registry
  • reviewboard.search.search_backends.whoosh
  • reviewboard.search.signal_processor
  • reviewboard.search.testing
  • reviewboard.site.conditions
  • reviewboard.site.context_processors
  • reviewboard.site.decorators
  • reviewboard.site.middleware
  • reviewboard.site.mixins
  • reviewboard.site.models
  • reviewboard.site.signals
  • reviewboard.site.templatetags.localsite
  • reviewboard.site.testing
  • reviewboard.site.testing.queries
  • reviewboard.site.urlresolvers
  • reviewboard.site.validation
  • reviewboard.ssh.client
  • reviewboard.ssh.errors
  • reviewboard.ssh.policy
  • reviewboard.ssh.storage
  • reviewboard.ssh.utils
  • reviewboard.testing.hosting_services
  • reviewboard.testing.queries
  • reviewboard.testing.queries.base
  • reviewboard.testing.queries.http
  • reviewboard.testing.scmtool
  • reviewboard.testing.testcase
  • reviewboard.themes
  • reviewboard.themes.context_processors
  • reviewboard.themes.ui
  • reviewboard.themes.ui.base
  • reviewboard.themes.ui.default
  • reviewboard.themes.ui.registry
  • reviewboard.webapi.auth_backends
  • reviewboard.webapi.base
  • reviewboard.webapi.decorators
  • reviewboard.webapi.errors
  • reviewboard.webapi.mixins
  • reviewboard.webapi.models
  • reviewboard.webapi.server_info
  • reviewboard.webapi.testing
  • reviewboard.webapi.testing.queries
  • reviewboard.webapi.tests.base
  • Frequently Asked Questions
  • General Index
  • Python Module Index
  • Release Notes
  • reviewboard.reviews.ui.base¶

    Base class for a Review UI.

    class SerializedCommentUser[source]¶

    Bases: TypedDict

    Serialized user for comment data.

    This must be kept in sync with the definitions in reviewboard/static/rb/js/reviews/models/commentData.ts.

    New in version 7.0.

    name: str¶

    The user’s full name, if available.

    username: str¶

    The user’s username.

    __annotations__ = {'name': ForwardRef('str', module='reviewboard.reviews.ui.base'), 'username': ForwardRef('str', module='reviewboard.reviews.ui.base')}¶
    __closed__ = False¶
    __extra_items__ = None¶
    __mutable_keys__ = frozenset({'name', 'username'})¶
    __optional_keys__ = frozenset({})¶
    __orig_bases__ = (<function TypedDict>,)¶
    __readonly_keys__ = frozenset({})¶
    __required_keys__ = frozenset({'name', 'username'})¶
    __total__ = True¶
    class SerializedComment[source]¶

    Bases: TypedDict

    Serialized comment data to pass through to JavaScript.

    This must be kept in sync with the definitions in reviewboard/static/rb/js/reviews/models/commentData.ts.

    New in version 7.0.

    comment_id: int¶

    The ID of the comment.

    html: str¶

    The rendered HTML version of the comment text.

    issue_opened: bool¶

    Whether the comment opens an issue.

    issue_status: str¶

    The status of the issue, if one was opened.

    localdraft: bool¶

    Whether the comment is part of the user’s current draft review.

    reply_to_id: int¶

    The ID of the comment that this comment is a reply to.

    review_id: int¶

    The ID of the review that this comment is a part of.

    review_request_id: int¶

    The ID of the review request that this comment is on.

    rich_text: bool¶

    Whether the comment text should be rendered in Markdown.

    text: str¶

    The raw text of the comment.

    url: str¶

    The URL to link to for the comment.

    user: SerializedCommentUser¶

    Information about the author of the comment.

    __annotations__ = {'comment_id': ForwardRef('int', module='reviewboard.reviews.ui.base'), 'html': ForwardRef('str', module='reviewboard.reviews.ui.base'), 'issue_opened': ForwardRef('bool', module='reviewboard.reviews.ui.base'), 'issue_status': ForwardRef('str', module='reviewboard.reviews.ui.base'), 'localdraft': ForwardRef('bool', module='reviewboard.reviews.ui.base'), 'reply_to_id': ForwardRef('int', module='reviewboard.reviews.ui.base'), 'review_id': ForwardRef('int', module='reviewboard.reviews.ui.base'), 'review_request_id': ForwardRef('int', module='reviewboard.reviews.ui.base'), 'rich_text': ForwardRef('bool', module='reviewboard.reviews.ui.base'), 'text': ForwardRef('str', module='reviewboard.reviews.ui.base'), 'url': ForwardRef('str', module='reviewboard.reviews.ui.base'), 'user': ForwardRef('SerializedCommentUser', module='reviewboard.reviews.ui.base')}¶
    __closed__ = False¶
    __extra_items__ = None¶
    __mutable_keys__ = frozenset({'comment_id', 'html', 'issue_opened', 'issue_status', 'localdraft', 'reply_to_id', 'review_id', 'review_request_id', 'rich_text', 'text', 'url', 'user'})¶
    __optional_keys__ = frozenset({})¶
    __orig_bases__ = (<function TypedDict>,)¶
    __readonly_keys__ = frozenset({})¶
    __required_keys__ = frozenset({'comment_id', 'html', 'issue_opened', 'issue_status', 'localdraft', 'reply_to_id', 'review_id', 'review_request_id', 'rich_text', 'text', 'url', 'user'})¶
    __total__ = True¶
    ReviewableType[source]¶

    A generic type for the reviewable object for a Review UI.

    New in version 7.0.

    alias of TypeVar(‘ReviewableType’)

    CommentType[source]¶

    A generic type for the type of comment used by a Review UI.

    New in version 7.0.

    alias of TypeVar(‘CommentType’, bound=BaseComment)

    SerializedCommentType[source]¶

    A generic type for the serialized comment data for a ReviewUI.

    New in version 7.0.

    alias of TypeVar(‘SerializedCommentType’, bound=SerializedComment)

    SerializedCommentBlocks¶

    A type for the serialized comments for a review UI.

    New in version 7.0.

    alias of Dict[str, List[SerializedCommentType]]

    class ReviewUI(review_request: ReviewRequest, obj: ReviewableType)[source]¶

    Bases: Generic[ReviewableType, CommentType, SerializedCommentType]

    Base class for a Review UI.

    Review UIs are interfaces for reviewing content of some type. They take a type of object and render a page around it, optionally allowing for the display of a diff view for the content. They can render context for comments made on the object, provide details for social media sharing (such as on a chat or social network).

    A Review UI makes use of a JavaScript side for the interaction, defined using js_model_class and js_view_class. The JavaScript side should interface with the API to create/update reviews and comments for the object being reviewed.

    diff_against_obj¶

    The object being diffed against, if any.

    Type:

    object

    obj¶

    The object being reviewed.

    Type:

    object

    request¶

    The HTTP request from the client. This is only set once render_to_string() is called.

    Type:

    django.http.HttpRequest

    review_request¶

    The review request containing the object being reviewed.

    Type:

    reviewboard.reviews.models.review_request.ReviewRequest

    name: ClassVar[str] = 'Unknown file type'¶

    The display name for the Review UI.

    template_name: ClassVar[str] = 'reviews/ui/default.html'¶

    The template that renders the Review UI.

    Generally, subclasses should use the default template and render the UI using JavaScript.

    allow_inline: ClassVar[bool] = False¶

    Whether the Review UI can be rendered inline in diffs and other places.

    If set, the Review UI will be able to be displayed within the diff viewer (and potentially other locations).

    supports_diffing: ClassVar[bool] = False¶

    Whether this Review UI supports diffing two objects.

    css_bundle_names: ClassVar[list[str]] = []¶

    A list of CSS bundle names to include on the Review UI’s page.

    js_bundle_names: ClassVar[list[str]] = []¶

    A list of JavaScript bundle names to include on the Review UI’s page.

    js_files: ClassVar[list[str]] = []¶

    A list of specific JavaScript URLs to include on the page.

    It is recommended that js_bundle_names be used instead where possible.

    supported_mimetypes: ClassVar[list[str]] = []¶

    The list of MIME types that this Review UI supports.

    supports_file_attachments: ClassVar[bool] = False¶

    Whether this Review UI supports reviewing FileAttachment objects.

    diff_type_mismatch: ClassVar[bool] = False¶

    Whether there’s a file type mismatch when showing diffs.

    property js_model_class: str[source]¶

    The name of the JavaScript model class to use for the Review UI.

    Type:

    str

    property js_view_class: str[source]¶

    The name of the JavaScript view class to use for the Review UI.

    Type:

    str

    property object_key: str[source]¶

    The key passed to the template representing the object.

    Type:

    str

    property diff_object_key: str[source]¶

    The key passed to the template for an object to diff against.

    Type:

    str

    __init__(review_request: ReviewRequest, obj: ReviewableType) → None[source]¶

    Initialize the Review UI.

    Parameters:
    • review_request (reviewboard.reviews.models.ReviewRequest) – The review request containing the object to review.

    • obj (object) – The object being reviewed.

    obj: ReviewableType¶

    The object being reviewed.

    diff_against_obj: Optional[ReviewableType]¶

    The object being compared against, if present.

    request: Optional[HttpRequest]¶

    The current HTTP request.

    set_diff_against(obj: ReviewableType) → None[source]¶

    Set the object to generate a diff against.

    This can only be called on Review UIs that support diffing, and must be called before rendering.

    Parameters:

    obj (object) – The object being diffed against.

    is_enabled_for(user: Optional[User] = None, review_request: Optional[ReviewRequest] = None, obj: Optional[object] = None, **kwargs) → bool[source]¶

    Return whether the Review UI is enabled under the given criteria.

    This can enable or disable a Review UI’s functionality depending on the user, review request, or some state associated with one or more of those.

    When this is called, the arguments are always passed as keyword arguments. Subclasses don’t need to accept all the arguments, as long as they take a **kwargs.

    Parameters:
    • user (django.contrib.auth.models.User, optional) – The user to check.

    • review_request (reviewboard.reviews.models.ReviewRequest, optional) – The review request to check.

    • obj (object, optional) – The object being reviewed.

    • **kwargs (dict) – Additional keyword arguments, for future expansion.

    Returns:

    True if the Review UI is enabled for the given criteria. False otherwise.

    By default, Review UIs are always enabled.

    Return type:

    bool

    render_to_response(request: HttpRequest) → HttpResponse[source]¶

    Render the Review UI to a response.

    This is used to render a page dedicated to the Review UI, complete with the standard Review Board chrome.

    Parameters:

    request (django.http.HttpRequest) – The HTTP request from the client.

    Returns:

    The HTTP response containing the page for the Review UI.

    Return type:

    django.http.HttpResponse

    render_to_string(request: HttpRequest, inline: bool = True) → SafeText[source]¶

    Render the Review UI to an HTML string.

    This renders the Review UI to a string for use in embedding into either an existing page or a new page.

    Parameters:
    • request (django.http.HttpRequest) – The HTTP request from the client.

    • inline (bool, optional) – Whether to render this such that it can be embedded into an existing page, instead of as a standalone page.

    Returns:

    The HTML for the Review UI.

    Return type:

    django.utils.safestring.SafeText

    build_render_context(request: HttpRequest, inline: bool = False, **kwargs) → dict[str, Any][source]¶

    Build context for rendering the page.

    This computes the standard template context to use when rendering the page. Generally, subclasses should override get_extra_context(), instead of this.

    Parameters:
    • request (django.http.HttpRequest) – The HTTP request from the client.

    • inline (bool, optional) – Whether to render this such that it can be embedded into an existing page, instead of as a standalone page.

    • **kwargs (dict, unused) – Keyword arguments, for future expansion.

    Returns:

    The context to use in the template.

    Return type:

    dict

    get_page_cover_image_url() → Optional[str][source]¶

    Return the URL to an image used to depict this on other sites.

    The returned image URL will be used for services like Facebook, Slack, Twitter, etc. when linking to the reviewable object. This may be anything from a standard thumbnail to a full-size image.

    By default, no image URL is returned.

    Returns:

    The absolute URL to an image used to depict the reviewable object.

    Return type:

    str

    get_comments() → Sequence[CommentType][source]¶

    Return all existing comments on the reviewable object.

    Subclasses must override this.

    Returns:

    The list of comments for the page.

    Return type:

    list of reviewboard.reviews.models.base_comment.BaseComment

    get_caption(draft: Optional[ReviewRequestDraft] = None) → str[source]¶

    Return the caption to show for the reviewable object.

    This defaults to requiring caption and draft_caption attributes on the reviewable object. Subclasses can override this to use something else.

    Parameters:

    draft (reviewboard.reviews.models.ReviewRequestDraft, optional) – The active review request draft for the user, if any.

    Returns:

    The caption for the reviewable object.

    Return type:

    str

    get_comment_thumbnail(comment: CommentType) → Optional[SafeText][source]¶

    Return an HTML thumbnail for a comment.

    If comment thumbnails are possible for the reviewable object, this function should return HTML for the thumbnail.

    Parameters:

    comment (reviewboard.reviews.models.base_comment.BaseComment) – The comment to return a thumbnail for.

    Returns:

    The HTML for a thumbnail for the comment, or None if one can’t be generated (using the default thumbnailing for the comment type, if one exists).

    Return type:

    django.utils.safestring.SafeText

    get_comment_link_url(comment: CommentType) → str[source]¶

    Return a URL for linking to a comment.

    Subclasses must override this.

    Parameters:

    comment (reviewboard.reviews.models.base_comment.BaseComment) – The comment to return a link for.

    Returns:

    The URL to link to the comment.

    Return type:

    str

    get_comment_link_text(comment: CommentType) → Optional[str][source]¶

    Return the text to link to a comment.

    This must be implemented by subclasses.

    Parameters:

    comment (reviewboard.reviews.models.base_comment.BaseComment) – The comment to return text for.

    Returns:

    The text used to link to the comment.

    Return type:

    str

    get_extra_context(request: HttpRequest) → dict[str, Any][source]¶

    Return extra context to use when rendering the Review UI.

    Parameters:

    request (django.http.HttpRequest) – The HTTP request from the client.

    Returns:

    The context to provide to the template.

    Return type:

    dict

    get_js_model_data() → JSONDict[source]¶

    Return data to pass to the JavaScript Model during instantiation.

    This data will be passed as attributes to the reviewable model when constructed.

    Returns:

    The attributes to pass to the model.

    Return type:

    dict

    get_js_view_data() → JSONDict[source]¶

    Return data to pass to the JavaScript View during instantiation.

    This data will be passed as options to the reviewable view when constructed.

    Returns:

    The options to pass to the view.

    Return type:

    dict

    get_comments_json() → str[source]¶

    Return a JSON-serialized representation of comments for a template.

    The result of this can be used directly in a template to provide comments to JavaScript functions.

    Returns:

    Serialized JSON content representing the comments on the reviewable object.

    Return type:

    str

    serialize_comments(comments: Sequence[CommentType]) → Dict[str, List[SerializedCommentType]][source]¶

    Serialize the comments for the Review UI target.

    By default, this will return a “flat” array of comments, but it can be overridden in order to group comments by identifier or region.

    Parameters:

    comments (list of reviewboard.reviews.models.base_comment.BaseComment) – The list of objects to serialize. This will be the result of get_comments().

    Returns:

    The set of serialized comment data.

    Return type:

    SerializedCommentBlocks

    flat_serialized_comments(comments: Sequence[CommentType]) → Iterator[SerializedCommentType][source]¶

    Yield the serialized comments.

    This will go through the list of comments and filter out any which should not be shown (ones which are in other users’ drafts), then yield the serialized form for each.

    Yields:

    SerializedComment – The serialized comment.

    serialize_comment(comment: CommentType) → SerializedComment[source]¶

    Serialize a comment.

    This will provide information on the comment that may be useful to the JavaScript code.

    Subclasses that want to add additional data should generally augment the result of this function and not replace it.

    Parameters:

    comment (reviewboard.reviews.models.base_comment.BaseComment) – The comment to serialize.

    Returns:

    The serialized comment data.

    Return type:

    SerializedComment

    classmethod for_object(obj: object) → Optional[type[reviewboard.reviews.ui.base.ReviewUI]][source]¶

    Return the Review UI that is the best fit for a given object.

    Parameters:

    obj (object) – The object to review.

    Returns:

    The Review UI class for the given object, or None if a suitable one could not be found.

    Return type:

    class

    __annotations__ = {'allow_inline': 'ClassVar[bool]', 'css_bundle_names': 'ClassVar[list[str]]', 'diff_against_obj': 'Optional[ReviewableType]', 'diff_type_mismatch': 'ClassVar[bool]', 'js_bundle_names': 'ClassVar[list[str]]', 'js_files': 'ClassVar[list[str]]', 'name': 'ClassVar[str]', 'obj': 'ReviewableType', 'request': 'Optional[HttpRequest]', 'supported_mimetypes': 'ClassVar[list[str]]', 'supports_diffing': 'ClassVar[bool]', 'supports_file_attachments': 'ClassVar[bool]', 'template_name': 'ClassVar[str]'}¶
    __orig_bases__ = (typing.Generic[~ReviewableType, ~CommentType, ~SerializedCommentType],)¶
    __parameters__ = (~ReviewableType, ~CommentType, ~SerializedCommentType)¶
    class FileAttachmentReviewUI(review_request: ReviewRequest, obj: ReviewableType)[source]¶

    Bases: ReviewUI

    Base class for Review UIs for file attachments.

    Review UIs that deal with FileAttachment objects can subclass this to provide the common functionality for their Review UI.

    This class handles fetching and serializing comments, locating a correct subclass for a given mimetype, and feeding data to the JavaScript RB.AbstractReviewable() model.

    This also handles much of the work for diffing file attachments.

    supports_file_attachments: ClassVar[bool] = True[source]¶

    Whether this Review UI supports reviewing FileAttachment objects.

    classmethod get_best_handler(mimetype: tuple[str, str, str]) → tuple[float, Optional[type[ReviewUI]]][source]¶

    Return the Review UI and score that that best fit the mimetype.

    Parameters:

    mimetype (tuple) – A parsed mimetype to find the best review UI for. This is a 3-tuple of the type, subtype, and parameters as returned by mimeparse.parse_mime_type().

    Returns:

    A tuple of (best_score, review_ui), or (0, None) if one could not be found.

    Return type:

    tuple

    classmethod for_type(attachment: FileAttachment) → Optional[ReviewUI][source]¶

    Return the Review UI that is the best fit for a file attachment.

    Parameters:

    attachment (reviewboard.attachments.models.FileAttachments) – The file attachment to locate a Review UI for.

    Returns:

    The Review UI for the attachment, or None if a suitable one could not be found.

    Return type:

    FileAttachmentReviewUI

    __annotations__ = {'allow_inline': 'ClassVar[bool]', 'css_bundle_names': 'ClassVar[list[str]]', 'diff_against_obj': 'Optional[ReviewableType]', 'diff_type_mismatch': 'ClassVar[bool]', 'js_bundle_names': 'ClassVar[list[str]]', 'js_files': 'ClassVar[list[str]]', 'name': 'ClassVar[str]', 'obj': 'ReviewableType', 'request': 'Optional[HttpRequest]', 'supported_mimetypes': 'ClassVar[list[str]]', 'supports_diffing': 'ClassVar[bool]', 'supports_file_attachments': 'ClassVar[bool]', 'template_name': 'ClassVar[str]'}¶
    __parameters__ = ()¶
    class DiffMismatchReviewUI(review_request: ReviewRequest, obj: ReviewableType)[source]¶

    Bases: ReviewUI

    A special review UI to show when the file types in a diff don’t match.

    diff_type_mismatch: ClassVar[bool] = True[source]¶

    Whether there’s a file type mismatch when showing diffs.

    supports_diffing: ClassVar[bool] = True[source]¶

    Whether this Review UI supports diffing two objects.

    __annotations__ = {'allow_inline': 'ClassVar[bool]', 'css_bundle_names': 'ClassVar[list[str]]', 'diff_against_obj': 'Optional[ReviewableType]', 'diff_type_mismatch': 'ClassVar[bool]', 'js_bundle_names': 'ClassVar[list[str]]', 'js_files': 'ClassVar[list[str]]', 'name': 'ClassVar[str]', 'obj': 'ReviewableType', 'request': 'Optional[HttpRequest]', 'supported_mimetypes': 'ClassVar[list[str]]', 'supports_diffing': 'ClassVar[bool]', 'supports_file_attachments': 'ClassVar[bool]', 'template_name': 'ClassVar[str]'}¶
    __parameters__ = ()¶
    register_ui(review_ui: type[reviewboard.reviews.ui.base.ReviewUI]) → None[source]¶

    Register a Review UI class.

    This will register a Review UI. Review Board will use it to display a UI when reviewing a supported file attachment.

    Parameters:

    review_ui (type) – The Review UI to register. This must be a subclass of ReviewUI.

    Raises:

    TypeError – The provided Review UI class is not of a compatible type.

    unregister_ui(review_ui: type[reviewboard.reviews.ui.base.ReviewUI]) → None[source]¶

    Unregister a Review UI class.

    This will unregister a previously registered Review UI.

    Only ReviewUI subclasses are supported. The class must have been registered beforehand or a ValueError will be thrown.

    Parameters:

    review_ui (type) – The Review UI to unregister. This must be a subclass of ReviewUI, and must have been registered before.

    Raises:
    • TypeError – The provided Review UI class is not of a compatible type.

    • ValueError – The provided Review UI was not previously registered.

    is_review_ui_enabled_for(*, review_ui: ReviewUI[FileAttachment, FileAttachmentComment, SerializedComment], request: HttpRequest, review_request: ReviewRequest, file_attachment: FileAttachment) → bool[source]¶

    Return whether a Review UI is enabled for the given object.

    Deprecated since version 7.0.3: Use is_review_ui_accessible_by() instead. This function will be removed in 8.0.

    New in version 7.0.2.

    Parameters:
    • review_ui (reviewboard.reviews.ui.base.ReviewUI) – The Review UI to check.

    • request (django.http.HttpRequest) – The HTTP request from the client.

    • review_request (reviewboard.reviews.models.ReviewRequest) – The review request.

    • file_attachment (reviewboard.attachments.models.FileAttachment) – The file attachment.

    Returns:

    True if the review UI is enabled for the given attachment.

    Return type:

    bool

    Keep up with the latest Review Board releases, security updates, and helpful information.

    About
    News
    Demo
    RBCommons Hosting
    Integrations
    Happy Users
    Support Options
    Documentation
    FAQ
    User Manual
    RBTools
    Administration Guide
    Power Pack
    Release Notes
    Downloads
    Review Board
    RBTools
    Djblets
    Power Pack
    Package Store
    PGP Signatures
    Contributing
    Bug Tracker
    Submit Patches
    Development Setup
    Wiki
    Follow Us
    Mailing Lists
    Reddit
    Twitter
    Mastodon
    Facebook
    YouTube

    Copyright © 2006-2025 Beanbag, Inc. All rights reserved.

    Terms of Service — Privacy Policy — AI Ethics Policy — Branding

    On this page

    • [Top]
    • SerializedCommentUser
      • SerializedCommentUser.name
      • SerializedCommentUser.username
      • SerializedCommentUser.__annotations__
      • SerializedCommentUser.__closed__
      • SerializedCommentUser.__extra_items__
      • SerializedCommentUser.__mutable_keys__
      • SerializedCommentUser.__optional_keys__
      • SerializedCommentUser.__orig_bases__
      • SerializedCommentUser.__readonly_keys__
      • SerializedCommentUser.__required_keys__
      • SerializedCommentUser.__total__
    • SerializedComment
      • SerializedComment.comment_id
      • SerializedComment.html
      • SerializedComment.issue_opened
      • SerializedComment.issue_status
      • SerializedComment.localdraft
      • SerializedComment.reply_to_id
      • SerializedComment.review_id
      • SerializedComment.review_request_id
      • SerializedComment.rich_text
      • SerializedComment.text
      • SerializedComment.url
      • SerializedComment.user
      • SerializedComment.__annotations__
      • SerializedComment.__closed__
      • SerializedComment.__extra_items__
      • SerializedComment.__mutable_keys__
      • SerializedComment.__optional_keys__
      • SerializedComment.__orig_bases__
      • SerializedComment.__readonly_keys__
      • SerializedComment.__required_keys__
      • SerializedComment.__total__
    • ReviewableType
    • CommentType
    • SerializedCommentType
    • SerializedCommentBlocks
    • ReviewUI
      • ReviewUI.diff_against_obj
      • ReviewUI.obj
      • ReviewUI.request
      • ReviewUI.review_request
      • ReviewUI.name
      • ReviewUI.template_name
      • ReviewUI.allow_inline
      • ReviewUI.supports_diffing
      • ReviewUI.css_bundle_names
      • ReviewUI.js_bundle_names
      • ReviewUI.js_files
      • ReviewUI.supported_mimetypes
      • ReviewUI.supports_file_attachments
      • ReviewUI.diff_type_mismatch
      • ReviewUI.js_model_class
      • ReviewUI.js_view_class
      • ReviewUI.object_key
      • ReviewUI.diff_object_key
      • ReviewUI.__init__()
      • ReviewUI.obj
      • ReviewUI.diff_against_obj
      • ReviewUI.request
      • ReviewUI.set_diff_against()
      • ReviewUI.is_enabled_for()
      • ReviewUI.render_to_response()
      • ReviewUI.render_to_string()
      • ReviewUI.build_render_context()
      • ReviewUI.get_page_cover_image_url()
      • ReviewUI.get_comments()
      • ReviewUI.get_caption()
      • ReviewUI.get_comment_thumbnail()
      • ReviewUI.get_comment_link_url()
      • ReviewUI.get_comment_link_text()
      • ReviewUI.get_extra_context()
      • ReviewUI.get_js_model_data()
      • ReviewUI.get_js_view_data()
      • ReviewUI.get_comments_json()
      • ReviewUI.serialize_comments()
      • ReviewUI.flat_serialized_comments()
      • ReviewUI.serialize_comment()
      • ReviewUI.for_object()
      • ReviewUI.__annotations__
      • ReviewUI.__orig_bases__
      • ReviewUI.__parameters__
    • FileAttachmentReviewUI
      • FileAttachmentReviewUI.supports_file_attachments
      • FileAttachmentReviewUI.get_best_handler()
      • FileAttachmentReviewUI.for_type()
      • FileAttachmentReviewUI.__annotations__
      • FileAttachmentReviewUI.__parameters__
    • DiffMismatchReviewUI
      • DiffMismatchReviewUI.diff_type_mismatch
      • DiffMismatchReviewUI.supports_diffing
      • DiffMismatchReviewUI.__annotations__
      • DiffMismatchReviewUI.__parameters__
    • register_ui()
    • unregister_ui()
    • is_review_ui_enabled_for()