- class ExtensionResource(extension_manager)¶
Provides information on installed extensions.
Returns the list of known extensions.
Each extension in the list has been installed, but may not be enabled.
Returns a dictionary of links coming off this resource.
The resulting links will point to the resources passed in
resources, and will also provide special resources for
self(which points back to the official location for this resource) and one per HTTP method/operation allowed on this resource.
Updates the state of the extension.
enabledis true, then the extension will be enabled, if it is not already. If false, it will be disabled.
Returns the Django URL patterns for this object and its children.
This is used to automatically build up the URL hierarchy for all objects. Projects should call this for top-level resources and return them in the
Returns links to the resources provided by the extension.
The result should be a dictionary of link names to a dictionary of information. The information should contain:
‘method’ - The HTTP method
‘href’ - The URL
‘title’ - The title of the link (optional)
‘resource’ - The WebAPIResource instance
‘list-resource’ - True if this links to a list resource (optional)
- class ExtensionRootResourceMixin(*args, **kwargs)¶
Mixin for Root Resources making use of Extension Resources.
As extensions are able to provide their own API resources, this mixin allows a root resource to generate URI templates for non built-in resources.