-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from NETWAYS/feature/req-2-4
Raise required Pretix version to 2.4.0+ and add compatibility checks
- Loading branch information
Showing
2 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |