Do not require new plugins to sett default=True on their AppConfig

This commit is contained in:
Raphael Michel
2022-12-19 12:34:49 +01:00
parent ab97082c85
commit 5dec94606b

View File

@@ -65,7 +65,14 @@ def get_all_plugins(event=None) -> List[type]:
)
class PluginConfig(AppConfig):
class PluginConfigMeta(type):
def __getattribute__(cls, item):
if item == "default" and cls is PluginConfig:
return False
return super().__getattribute__(item)
class PluginConfig(AppConfig, metaclass=PluginConfigMeta):
IGNORE = False
def __init__(self, *args, **kwargs):