2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 04:26:44 +00:00
2022-05-11 16:46:03 +02:00

24 lines
556 B
Python

"""
Sample plugin which responds to events
"""
from plugin import InvenTreePlugin
from plugin.mixins import EventMixin
class EventPluginSample(EventMixin, InvenTreePlugin):
"""
A sample plugin which provides supports for triggered events
"""
NAME = "EventPlugin"
SLUG = "event"
TITLE = "Triggered Events"
def process_event(self, event, *args, **kwargs):
""" Custom event processing """
print(f"Processing triggered event: '{event}'")
print("args:", str(args))
print("kwargs:", str(kwargs))