Add a class for handling the registration and lookup of API resources.
Review Request #7477 — Created July 2, 2015 and submitted
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.
- Change Summary:
-
- Added a missing import.
- Switched to using
logging.exception
, which also improves this by adding a traceback.
- Commit:
-
6856c0f7888f2c0aa822095145e82a0123ce1786a3d18a843da1446ac5221387f4ba4b2cd1cf95aa