Skip to content

Commit

Permalink
Merge pull request #2 from NETWAYS/feature/req-2-4
Browse files Browse the repository at this point in the history
Raise required Pretix version to 2.4.0+ and add compatibility checks
  • Loading branch information
Michael Friedrich authored Mar 20, 2019
2 parents 280fa44 + 86698f2 commit 1758150
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
This plugin adds a custom checkin list export for NETWAYS hosted events and conferences
using <a href="https://pretix.eu/about/en/"><img src="https://github.com/NETWAYS/pretix-invoice-net/blob/master/res/logo.png" height="25"></a>.

## Requirements

* Pretix >= 2.4.0

## Installation

https://pypi.python.org/pypi/pretix-checkinlist-net
Expand All @@ -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

Expand Down
16 changes: 15 additions & 1 deletion pretix_checkinlist_net/__init__.py
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'

0 comments on commit 1758150

Please sign in to comment.