mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
more code structure
This commit is contained in:
parent
debad4ab9a
commit
0b0c4cf337
@ -4,12 +4,14 @@ import logging
|
|||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import url, include
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
import plugins.plugin as plugin
|
import plugins.plugin as plugin
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger("inventree")
|
logger = logging.getLogger("inventree")
|
||||||
|
|
||||||
|
|
||||||
|
# region mixins
|
||||||
class SettingsMixin:
|
class SettingsMixin:
|
||||||
"""Mixin that enables settings for the plugin"""
|
"""Mixin that enables settings for the plugin"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -71,6 +73,7 @@ class UrlsMixin:
|
|||||||
does this plugin use custom urls
|
does this plugin use custom urls
|
||||||
"""
|
"""
|
||||||
return bool(self.urls)
|
return bool(self.urls)
|
||||||
|
# endregion
|
||||||
|
|
||||||
|
|
||||||
class IntegrationPlugin(plugin.InvenTreePlugin):
|
class IntegrationPlugin(plugin.InvenTreePlugin):
|
||||||
|
Loading…
Reference in New Issue
Block a user