Source code for werewolf.__init__

__title__ = 'werewolf.views'
__version__ = '0.2'
__build__ = 0x000002
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__all__ = ('autodiscover',)

import imp

from django.conf import settings

[docs]def autodiscover(): """ Autodiscovers the werewolf in project apps. Each report file which should be found by werewolf, should be named "werewolf_triggers.py". """ from django.conf import settings WEREWOLF_TRIGGERS_MODULE_NAME = 'werewolf_triggers' for app in settings.INSTALLED_APPS: try: app_path = __import__(app, {}, {}, [app.split('.')[-1]]).__path__ except AttributeError: continue try: imp.find_module(WEREWOLF_TRIGGERS_MODULE_NAME, app_path) except ImportError: continue __import__('%s.%s' % (app, WEREWOLF_TRIGGERS_MODULE_NAME))
Read the Docs v: 0.2
Versions
latest
0.4.2
0.3
0.2
0.1
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.