34 lines
885 B
Python
34 lines
885 B
Python
from django.apps import AppConfig
|
|
from django.utils.functional import cached_property
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
__version__ = '1.0'
|
|
|
|
|
|
class StripeApp(AppConfig):
|
|
name = 'pretix_stripe2'
|
|
verbose_name = _("Stripe2")
|
|
|
|
class PretixPluginMeta:
|
|
name = _("Stripe2")
|
|
author = _("Lee Yingtong Li")
|
|
version = __version__
|
|
category = 'PAYMENT'
|
|
description = _("This plugin allows you to receive credit card payments " +
|
|
"via Stripe")
|
|
|
|
def ready(self):
|
|
from . import signals, tasks # NOQA
|
|
|
|
@cached_property
|
|
def compatibility_errors(self):
|
|
errs = []
|
|
try:
|
|
import stripe # NOQA
|
|
except ImportError:
|
|
errs.append("Python package 'stripe' is not installed.")
|
|
return errs
|
|
|
|
|
|
default_app_config = 'pretix_stripe2.StripeApp'
|