Source code for dash.discover

import imp

[docs]def autodiscover(): """ Autodiscovers files that should be found by dash. """ from django.conf import settings from dash.settings import PLUGINS_MODULE_NAME, LAYOUTS_MODULE_NAME def do_discover(module_name): for app in settings.INSTALLED_APPS: try: app_path = __import__(app, {}, {}, [app.split('.')[-1]]).__path__ except AttributeError: continue try: imp.find_module(module_name, app_path) except ImportError: continue __import__('{0}.{1}'.format(app, module_name)) # Discover layouts do_discover(LAYOUTS_MODULE_NAME) # Discover plugins do_discover(PLUGINS_MODULE_NAME)
Read the Docs v: 0.2.4
Versions
latest
0.3.2
0.3
0.2.4
0.1.4
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.