NDOJ/judge/utils/subscription.py

9 lines
246 B
Python
Raw Normal View History

2020-01-21 06:35:58 +00:00
from django.conf import settings
if 'newsletter' in settings.INSTALLED_APPS:
from newsletter.models import Subscription
else:
Subscription = None
newsletter_id = None if Subscription is None else settings.DMOJ_NEWSLETTER_ID_ON_REGISTER