getattr should look for "SETTINGS" and not "GLOBALSETTINGS"

This commit is contained in:
Oliver 2021-12-30 23:04:08 +11:00
parent 690ba811ef
commit 04820c894b

View File

@ -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):