Skip to content

Commit

Permalink
Removed module importing code from __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lethain committed Dec 14, 2008
1 parent 1b1c90a commit de48281
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions __init__.py
@@ -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)

0 comments on commit de48281

Please sign in to comment.