-
-
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
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 … |
chipx86 | |
Blank line between these. |
chipx86 | |
And here. |
chipx86 | |
Can we be sure that this will be true for every extension resource? I've written one or two toy extension … |
mike_conley |
- Change Summary:
-
Updated based off of Christian's review.
- Description:
-
~ This change adds the Web API resources defined in an extensions
resources
attribute to the link tree. Now each resource will be added to the 'links' dictionary of the extensions resource, and in the list of extensions. These links will only appear when the extension is enabled.~ 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 generating of the resource URLs. The URLs were generated with the wrong attribute, causing them to use underscores instead of dashes.
~ 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.