mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-21 14:20:54 +00:00
move invenTreePlugin to new class
to enable depreceation
This commit is contained in:
InvenTree
@ -2,14 +2,16 @@
|
||||
"""
|
||||
Base Class for InvenTree plugins
|
||||
"""
|
||||
import warnings
|
||||
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
from django.utils.text import slugify
|
||||
|
||||
|
||||
class AAInvenTreePlugin():
|
||||
class InvenTreePluginBase():
|
||||
"""
|
||||
Base class for a plugin
|
||||
DO NOT USE THIS DIRECTLY, USE plugin.IntegrationPluginBase
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
@ -82,3 +84,13 @@ class AAInvenTreePlugin():
|
||||
return cfg.active
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
# TODO @matmair remove after InvenTree 0.7.0 release
|
||||
class InvenTreePlugin(InvenTreePluginBase):
|
||||
"""
|
||||
This is here for leagcy reasons and will be removed in the next major release
|
||||
"""
|
||||
def __init__(self):
|
||||
warnings.warn("Using the InvenTreePlugin is depreceated", DeprecationWarning)
|
||||
super().__init__()
|
||||
|
Reference in New Issue
Block a user