From 527457d0c8e964e81043e56684b35d8dd6b2326d Mon Sep 17 00:00:00 2001 From: Ember Keske Date: Tue, 22 Aug 2023 16:07:18 +0200 Subject: [PATCH] move to apps.py --- pretix_poos/__init__.py | 27 --------------------------- pretix_poos/apps.py | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 27 deletions(-) create mode 100644 pretix_poos/apps.py diff --git a/pretix_poos/__init__.py b/pretix_poos/__init__.py index 3f3dfb8..5becc17 100644 --- a/pretix_poos/__init__.py +++ b/pretix_poos/__init__.py @@ -1,28 +1 @@ -from django.utils.translation import gettext_lazy - -try: - from pretix.base.plugins import PluginConfig -except ImportError: - raise RuntimeError("Please use pretix 2.7 or above to run this plugin!") - __version__ = "1.0.0" - - -class PluginApp(PluginConfig): - name = "pretix_poos" - verbose_name = "Pretix POOS" - - class PretixPluginMeta: - name = gettext_lazy("Pretix POOS") - author = "n0emis" - description = gettext_lazy("Short description") - visible = True - version = __version__ - category = "CUSTOMIZATION" - compatibility = "pretix>=2.7.0" - - def ready(self): - from . import signals # NOQA - - -default_app_config = "pretix_poos.PluginApp" diff --git a/pretix_poos/apps.py b/pretix_poos/apps.py new file mode 100644 index 0000000..bdbdb7b --- /dev/null +++ b/pretix_poos/apps.py @@ -0,0 +1,20 @@ +from django.apps import AppConfig +from django.utils.functional import cached_property +from django.utils.translation import gettext_lazy +from . import __version__ + +class PoosApp(AppConfig): + name = 'pretix_poos' + verbose_name = 'Pretix POOS' + + class PretixPluginMeta: + name = gettext_lazy('Pretix POOS') + author = 'Ember Keske' + description = gettext_lazy('Import Bank transactions automatically via nordigen') + category = 'CUSTOMIZATION' + visible = False + version = __version__ + compatibility = "pretix>=4.17.0" + + def ready(self): + from . import signals # NOQA