-
-
djblets/extensions/models.py (Diff revision 1) Managers, no, but unless an extension has its own ExtensionManager, there will only be one. (Maybe we should add an ID for the ExtensionManager and include that as a field for the extension's model). As for the extension, the extension ID is the class name (see line 436). So, you can just call get_installed_extension(self.class_name).
-
-
Fix link generation for extension web API resources
Review Request #3082 — Created April 25, 2012 and submitted
Information | |
---|---|
smacleod | |
Djblets | |
Reviewers | |
djblets | |
mike_conley |
This change adds the Web API resources defined in an extension's `resources` attribute to the link tree. Now each resource will be added to the 'links' dictionary of the extension resource, and in the list of extensions. These links will only appear when the extension is enabled. Also fixed is improper generation of the resource URLs. The URLs were generated with the wrong attribute, causing them to use underscores instead of dashes.
Tested with my new extension's resources, and the extensions with resources found here: https://github.com/mikeconley/RB-Toy-Extensions
Description | From | Last Updated |
---|---|---|
Managers, no, but unless an extension has its own ExtensionManager, there will only be one. (Maybe we should add an … |
|
|
Blank line between these. |
|
|
And here. |
|
|
Can we be sure that this will be true for every extension resource? I've written one or two toy extension … |
|
Change Summary:
Updated based off of Christian's review.
Description: |
|
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+53 -1) |
-
Hey Steven, Just one question - see below, -Mike
-
djblets/extensions/resources.py (Diff revision 2) Can we be sure that this will be true for every extension resource? I've written one or two toy extension that use PUT and DELETE, and don't respond to GET... Or am I missing an assumption here?