Skip to content

Commit 1c84ce8

Browse files
committed
Fix plugin not importing
1 parent ff8d3bf commit 1c84ce8

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

pretix_extended_api/__init__.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +0,0 @@
1-
from django.utils.translation import gettext_lazy
2-
from importlib.metadata import version
3-
4-
try:
5-
from pretix.base.plugins import PluginConfig
6-
except ImportError:
7-
raise RuntimeError("Please use pretix 2.7 or above to run this plugin!")
8-
9-
10-
class PluginApp(PluginConfig):
11-
name = "pretix_extended_api"
12-
verbose_name = "Extended API"
13-
14-
class PretixPluginMeta:
15-
name = gettext_lazy("Extended API")
16-
author = "Python Italia"
17-
description = gettext_lazy(
18-
"Extend the REST API to expose more information needed by PyCon Italia"
19-
)
20-
visible = True
21-
version = version("pretix-plugin-extended-api")
22-
category = "API"
23-
compatibility = "pretix>=2.7.0"
24-
25-
def ready(self):
26-
from . import signals # NOQA
27-
28-
29-
default_app_config = "pretix_extended_api.PluginApp"

pretix_extended_api/apps.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from django.utils.translation import gettext_lazy
2+
from importlib.metadata import version
3+
4+
try:
5+
from pretix.base.plugins import PluginConfig
6+
except ImportError:
7+
raise RuntimeError("Please use pretix 2.7 or above to run this plugin!")
8+
9+
10+
class PluginApp(PluginConfig):
11+
name = "pretix_extended_api"
12+
verbose_name = "Extended API"
13+
14+
class PretixPluginMeta:
15+
name = gettext_lazy("Extended API")
16+
author = "Python Italia"
17+
description = gettext_lazy(
18+
"Extend the REST API to expose more information needed by PyCon Italia"
19+
)
20+
visible = True
21+
version = version("pretix-plugin-extended-api")
22+
category = "API"
23+
compatibility = "pretix>=2.7.0"
24+
25+
def ready(self):
26+
from . import signals # NOQA
27+
28+
29+
default_app_config = "pretix_extended_api.PluginApp"

0 commit comments

Comments
 (0)