mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
basic integration plugin
This commit is contained in:
parent
7319150e7c
commit
9f3862ab27
37
InvenTree/plugins/integration/integration.py
Normal file
37
InvenTree/plugins/integration/integration.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
import plugins.plugin as plugin
|
||||||
|
|
||||||
|
|
||||||
|
logger = logging.getLogger("inventree")
|
||||||
|
|
||||||
|
|
||||||
|
class IntegrationPlugin(plugin.InvenTreePlugin):
|
||||||
|
"""
|
||||||
|
The IntegrationPlugin class is used to integrate with 3rd party software
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
"""
|
||||||
|
"""
|
||||||
|
plugin.InvenTreePlugin.__init__(self)
|
||||||
|
|
||||||
|
self.urls = self.setup_urls()
|
||||||
|
|
||||||
|
def setup_urls(self):
|
||||||
|
"""
|
||||||
|
setup url endpoints for this plugin
|
||||||
|
"""
|
||||||
|
if self.urlpatterns:
|
||||||
|
return self.urlpatterns
|
||||||
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_urls(self):
|
||||||
|
"""
|
||||||
|
does this plugin use custom urls
|
||||||
|
"""
|
||||||
|
return bool(self.urls)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user