Skip to content

Commit

Permalink
don't try to import the app module if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
ptone committed Aug 28, 2012
1 parent 35484cc commit 3a4fca5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions django/apps/cache.py
Expand Up @@ -110,8 +110,9 @@ def _populate(self):
'The apps "%s" and "%s"'
' have the same db_prefix "%s"'
% (app, app2, app._meta.db_prefix))
app._meta.module = import_module(app._meta.name)
app._meta.path = os.path.dirname(app._meta.module.__file__)
if app._meta.installed:
app._meta.module = import_module(app._meta.name)
app._meta.path = os.path.dirname(app._meta.module.__file__)
app.register_models()
post_load = getattr(app, 'post_load', None)
if post_load is not None and callable(post_load):
Expand Down

0 comments on commit 3a4fca5

Please sign in to comment.