forked from dj-stripe/dj-stripe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apps.py
31 lines (23 loc) · 754 Bytes
/
apps.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
dj-stripe - Django + Stripe Made Easy
"""
from importlib.metadata import version
from django.apps import AppConfig
__version__ = version("dj-stripe")
class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads system checks
and event handlers once Django is ready.
"""
name = "djstripe"
default_auto_field = "django.db.models.AutoField"
def ready(self):
import stripe
from . import checks, event_handlers # noqa (register event handlers)
# Set app info
# https://stripe.com/docs/building-plugins#setappinfo
stripe.set_app_info(
"dj-stripe",
version=__version__,
url="https://github.com/dj-stripe/dj-stripe",
)