diff -r 82ee1efc2706 django/utils/module_loading.py
--- a/django/utils/module_loading.py	Wed Apr 21 21:54:31 2010 +0200
+++ b/django/utils/module_loading.py	Fri Apr 23 10:00:38 2010 +0200
@@ -5,7 +5,7 @@
     # If the module was loaded from an egg, __loader__ will be set and 
     # its find_module must be used to search for submodules.
     loader = getattr(mod, '__loader__', None)
-    if loader:
+    if loader and hasattr(loader, 'prefix'):
         mod_path = "%s.%s" % (mod.__name__, submod_name)
         mod_path = mod_path[len(loader.prefix):]
         x = loader.find_module(mod_path)
