diff --git a/README.md b/README.md index 4702a17..5adc1b4 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ This plugin adds a custom checkin list export for NETWAYS hosted events and conferences using . +## Requirements + +* Pretix >= 2.4.0 + ## Installation https://pypi.python.org/pypi/pretix-checkinlist-net @@ -26,7 +30,7 @@ Navigate into the admin control panel and choose your event. `Settings > Plugins` and enable the plugin. -`Orders > Export > Check-in list (CSV) for NETWAYS`. +`Orders > Export > Check-in list for NETWAYS`. ## Documentation diff --git a/pretix_checkinlist_net/__init__.py b/pretix_checkinlist_net/__init__.py index e42d1ab..88ab6fa 100644 --- a/pretix_checkinlist_net/__init__.py +++ b/pretix_checkinlist_net/__init__.py @@ -1,20 +1,34 @@ from django.apps import AppConfig +from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy +from packaging import version + +from pretix import __version__ as appVersion class PluginApp(AppConfig): name = 'pretix_checkinlist_net' verbose_name = 'Pretix Checkin List Exporter for NETWAYS' + required_core_version = '2.4.0' class PretixPluginMeta: name = ugettext_lazy('Pretix Checkin List Exporter for NETWAYS') author = 'NETWAYS GmbH' - description = ugettext_lazy('Short description') + description = ugettext_lazy('This plugins allows to create custom event exports in Excel/CSV') visible = True version = '1.0.0' def ready(self): from . import signals # NOQA + @cached_property + def compatibility_warnings(self): + errs = [] + + if version.parse(appVersion) < version.parse(self.required_core_version): + errs.append("Pretix version %s is too old. Minimum required is %s." % (appVersion, self.required_core_version)) + + return errs + default_app_config = 'pretix_checkinlist_net.PluginApp'