2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-28 13:46:54 +00:00

move annotation markers

This commit is contained in:
Matthias Mair 2022-01-19 00:47:43 +01:00
parent f847108af6
commit 3beb1f0734

View File

@ -50,16 +50,19 @@ from plugin.mixins import APICallMixin, SettingsMixin, ScheduleMixin, BarcodeMix
### A simple example ### A simple example
This example adds a new action under `/api/action/sample` using the ActionMixin. This example adds a new action under `/api/action/sample` using the ActionMixin.
``` py ``` py
# -*- coding: utf-8 -*- # (1) # -*- coding: utf-8 -*-
"""sample implementation for ActionPlugin""" # (2) # (1)
"""sample implementation for ActionPlugin"""
# (2)
from plugin import IntegrationPluginBase from plugin import IntegrationPluginBase
from plugin.mixins import ActionMixin from plugin.mixins import ActionMixin
class SampleActionPlugin(ActionMixin, IntegrationPluginBase): class SampleActionPlugin(ActionMixin, IntegrationPluginBase):
""" """
Use docstrings for everything... pls # (2) Use docstrings for everything... pls
""" """
# (2)
PLUGIN_NAME = "SampleActionPlugin" PLUGIN_NAME = "SampleActionPlugin"
ACTION_NAME = "sample" ACTION_NAME = "sample"