Views
PluginMeta views.
- class smarter.apps.plugin.api.v1.views.AddPluginExamplesView(*args, **kwargs)[source]
Bases:
SmarterAuthenticatedAPIViewAdd example plugins to a user profile.
- post(request, user_id=None)[source]
- class smarter.apps.plugin.api.v1.views.PluginCloneView(*args, **kwargs)[source]
Bases:
SmarterAuthenticatedAPIViewPlugin clone view for smarter api.
- post(request, plugin_id, new_name)[source]
- class smarter.apps.plugin.api.v1.views.PluginListView(**kwargs)[source]
Bases:
SmarterAuthenticatedListAPIViewPlugins list view for smarter api.
- get_queryset()[source]
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- serializer_class
alias of
PluginMetaSerializer
- class smarter.apps.plugin.api.v1.views.PluginUploadView(*args, **kwargs)[source]
Bases:
SmarterAuthenticatedAPIViewPlugin view for smarter api.
- static parse_yaml_file(data)[source]
- parser_class = (<class 'rest_framework.parsers.FileUploadParser'>,)
- post(request)[source]
- put(request)[source]
- class smarter.apps.plugin.api.v1.views.PluginView(*args, **kwargs)[source]
Bases:
SmarterAuthenticatedAPIViewPlugin view for smarter api.
- delete(request, plugin_id)[source]
- get(request, plugin_id)[source]
- patch(request)[source]
- post(request)[source]
- put(request)[source]
- smarter.apps.plugin.api.v1.views.create_plugin(request, data=None)[source]
Create a plugin from a json representation in the body of the request.
- smarter.apps.plugin.api.v1.views.delete_plugin(request, plugin_id)[source]
delete a plugin by id.
- smarter.apps.plugin.api.v1.views.get_plugin(request, plugin_id)[source]
Get a plugin json representation by id.
- smarter.apps.plugin.api.v1.views.update_plugin(request)[source]
update a plugin from a json representation in the body of the request.