expephalon/core/modules/otp.py
Klaus-Uwe Mitterer d74a4c1b8b User profile models
SMS OTP provider
Login template (without css)
2020-04-13 20:03:01 +02:00

13 lines
No EOL
322 B
Python

import importlib
from django.conf import settings
providers = []
for module in settings.EXPEPHALON_MODULES:
try:
moo = importlib.import_module(f"{module}.otp")
for provider in moo.OTPPROVIDERS:
providers.append(provider)
except (AttributeError, ModuleNotFoundError):
continue