Fix import path of WebAPIResource in extension documentation.

Review Request #10319 — Created Nov. 11, 2018 and submitted

Information

Review Board
release-3.0.x
a51b593...

Reviewers

We had a bad import path in the sample code for implementing a new
API resource in an extension. This change fixes it.

Built HTML.

Description From Last Updated

This is also incorrect. "Request" -> "request", but more importantly, it should be: from reviewboard.webapi.resources import resources ... resources.review_request In …

chipx86chipx86

Swap these.

chipx86chipx86

resources.review_request

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    This is also incorrect. "Request" -> "request", but more importantly, it should be:

    from reviewboard.webapi.resources import resources
    
    ...
    
    resources.review_request
    

    In fact, the original import (WebAPIResource) from this module was actually valid. .base is what the other resources use in order to avoid circular import issues, and no doubt we'll support both going forward, but probably we'd want to standardize on importing this from .resources.

  3. 
      
david
chipx86
  1. 
      
  2. Show all issues

    Swap these.

  3. Show all issues

    resources.review_request

  4. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (a51b593)