mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
Add legacy
This commit is contained in:
parent
1571b99ed2
commit
dfb11cca1d
@ -3,13 +3,14 @@ Utility file to enable simper imports
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from .registry import registry
|
from .registry import registry
|
||||||
from .plugin import InvenTreePlugin
|
from .plugin import InvenTreePlugin, IntegrationPluginBase
|
||||||
from .helpers import MixinNotImplementedError, MixinImplementationError
|
from .helpers import MixinNotImplementedError, MixinImplementationError
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'registry',
|
'registry',
|
||||||
|
|
||||||
'InvenTreePlugin',
|
'InvenTreePlugin',
|
||||||
|
IntegrationPluginBase,
|
||||||
'MixinNotImplementedError',
|
'MixinNotImplementedError',
|
||||||
'MixinImplementationError',
|
'MixinImplementationError',
|
||||||
]
|
]
|
||||||
|
@ -7,6 +7,7 @@ import os
|
|||||||
import inspect
|
import inspect
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import warnings
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db.utils import OperationalError, ProgrammingError
|
from django.db.utils import OperationalError, ProgrammingError
|
||||||
@ -336,3 +337,11 @@ class InvenTreePlugin(MixinBase, InvenTreePluginBase):
|
|||||||
self.package = package
|
self.package = package
|
||||||
self.sign_state = sign_state
|
self.sign_state = sign_state
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
|
|
||||||
|
class IntegrationPluginBase(InvenTreePlugin):
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
"""Send warning about using this reference"""
|
||||||
|
# TODO remove in 0.8.0
|
||||||
|
warnings.warn("This import is deprecated - use InvenTreePlugin", DeprecationWarning)
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user