Fix import path of WebAPIResource in extension documentation.

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

david
Review Board
release-3.0.x
a51b593...
reviewboard

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.

  • 0
  • 0
  • 3
  • 0
  • 3
Description From Last Updated
chipx86
  1. 
      
  2. 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. Swap these.

  3. resources.review_request

  4. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (a51b593)
Loading...