mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
getattr should look for "SETTINGS" and not "GLOBALSETTINGS"
This commit is contained in:
parent
690ba811ef
commit
04820c894b
@ -1,14 +1,19 @@
|
|||||||
"""default mixins for IntegrationMixins"""
|
"""
|
||||||
|
Plugin mixin classes
|
||||||
|
"""
|
||||||
|
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import url, include
|
||||||
|
|
||||||
from plugin.urls import PLUGIN_BASE
|
from plugin.urls import PLUGIN_BASE
|
||||||
|
|
||||||
|
|
||||||
class GlobalSettingsMixin:
|
class GlobalSettingsMixin:
|
||||||
"""Mixin that enables global settings for the plugin"""
|
"""
|
||||||
|
Mixin that enables global settings for the plugin
|
||||||
|
"""
|
||||||
|
|
||||||
class MixinMeta:
|
class MixinMeta:
|
||||||
"""meta options for this mixin"""
|
MIXIN_NAME = 'Settings'
|
||||||
MIXIN_NAME = 'Global settings'
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
@ -19,7 +24,7 @@ class GlobalSettingsMixin:
|
|||||||
"""
|
"""
|
||||||
setup global settings for this plugin
|
setup global settings for this plugin
|
||||||
"""
|
"""
|
||||||
return getattr(self, 'GLOBALSETTINGS', None)
|
return getattr(self, 'SETTINGS', None)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def has_globalsettings(self):
|
def has_globalsettings(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user