Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed module importing code from __init__.py
- Loading branch information
Showing
1 changed file
with
0 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1 @@ | ||
""" | ||
Import any enabled modules as specified in the settings.py | ||
file for the project. | ||
""" | ||
|
||
import imp | ||
import sys | ||
from django.conf import settings | ||
|
||
|
||
def import_module(name, globals=None, locals=None, fromlist=None): | ||
# Fast path: see if the module has already been imported. | ||
try: | ||
return sys.modules[name] | ||
except KeyError: | ||
pass | ||
|
||
# If any of the following calls raises an exception, | ||
# there's a problem we can't handle -- let the caller handle it. | ||
|
||
_, pathname, description = imp.find_module("lifeflow") | ||
path = u"%s/mods/%s" % (pathname, name) | ||
return imp.load_module(name, None, path, description) | ||
|
||
|
||
for mod in getattr(settings, u"LIFEFLOW_MODS", ()): | ||
import_module(mod) | ||
|