1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import logging
from importlib import import_module
from django.conf import settings
print logging, logging.__name__
logger = logging.getLogger(__name__)
signal_modules = {}
for app in settings.INSTALLED_APPS:
signals_module = '%s.signals' % app
try:
signal_modules[app] = import_module(signals_module)
except ImportError as e:
logger.warning(
'failed to import "%s", reason: %s' % (signals_module, str(e)))
|
More like this
- immitating 'real' post_syncdb signal by jango 3 years, 1 month ago
- dropbox integration by ivarne 1 year, 2 months ago
- Complex Form Preview by smagala 4 years, 1 month ago
- Django Registration with GMail account by btbytes 6 years, 1 month ago
- Testrunner with testmodels by nfg 3 years, 3 months ago
Comments
sry left prin by mistake XD,, can edit this snippet ?
#