feat: Initial commit
This commit is contained in:
commit
cfa40c6918
24 changed files with 669 additions and 0 deletions
43
pretix_congressschedule/apps.py
Normal file
43
pretix_congressschedule/apps.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
from django.apps import AppConfig
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.translation import gettext_lazy
|
||||
|
||||
from . import __version__
|
||||
|
||||
|
||||
class PassbookApp(AppConfig):
|
||||
name = "pretix_congressschedule"
|
||||
verbose_name = "Congress Schedule"
|
||||
|
||||
class PretixPluginMeta:
|
||||
name = gettext_lazy("Congress Schedule")
|
||||
author = "Vincent Mahnke"
|
||||
description = gettext_lazy("Provides passbook tickets for pretix")
|
||||
category = "API"
|
||||
visible = True
|
||||
featured = True
|
||||
version = __version__
|
||||
compatibility = "pretix>=4.17.0"
|
||||
|
||||
def ready(self):
|
||||
from . import signals # NOQA
|
||||
|
||||
@cached_property
|
||||
def compatibility_errors(self):
|
||||
import shutil
|
||||
|
||||
errs = []
|
||||
if not shutil.which("openssl"):
|
||||
errs.append("The OpenSSL binary is not installed or not in the PATH.")
|
||||
return errs
|
||||
|
||||
@cached_property
|
||||
def compatibility_warnings(self):
|
||||
errs = []
|
||||
try:
|
||||
from PIL import Image # NOQA
|
||||
except ImportError:
|
||||
errs.append(
|
||||
"Pillow is not installed on this system, which is required for converting and scaling images."
|
||||
)
|
||||
return errs
|
||||
Loading…
Add table
Add a link
Reference in a new issue