Add a class for handling the registration and lookup of API resources.

Review Request #7477 — Created July 2, 2015 and submitted

chipx86
Djblets
release-0.9.x
a3d18a8...
djblets
In Review Board, we had a nice little class that would handle the
loading of resources on-demand, and would allow for resources to
reference each other sanely without worrying about import loops.

This change brings the base of that class into Djblets, so that any
consumer of the API can use it. It's now easy to get this same
functionality in all applications interfacing with djblets.webapi.

Made use of this in Review Board, and all unit tests passed.

Description From Last Updated

undefined name 'logging'

reviewbotreviewbot

I think we should start converting to using logging.exception here. Once that's changed, this should also pass in name as ...

daviddavid
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/webapi/resources/registry.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/webapi/resources/registry.py
    
    
  2. djblets/webapi/resources/registry.py (Diff revision 1)
     
     
     undefined name 'logging'
    
  3. 
      
david
  1. 
      
  2. djblets/webapi/resources/registry.py (Diff revision 1)
     
     
     

    I think we should start converting to using logging.exception here. Once that's changed, this should also pass in name as an argument rather than formatting it in.

  3. 
      
chipx86
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/webapi/resources/registry.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/webapi/resources/registry.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.9.x (b105111)
Loading...