Add a class for handling the registration and lookup of API resources.
Review Request #7477 — Created July 2, 2015 and submitted
Information | |
---|---|
chipx86 | |
Djblets | |
release-0.9.x | |
a3d18a8... | |
Reviewers | |
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.
-
-
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 inname
as an argument rather than formatting it in.
Change Summary:
- Added a missing import.
- Switched to using
logging.exception
, which also improves this by adding a traceback.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+74) |