43 lines
1.2 KiB
Python
43 lines
1.2 KiB
Python
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 c3voc-schedule compatible XML files")
|
|
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
|