1 | Index: django/core/management/__init__.py
|
---|
2 | ===================================================================
|
---|
3 | --- django/core/management/__init__.py (revision 11322)
|
---|
4 | +++ django/core/management/__init__.py (working copy)
|
---|
5 | @@ -50,8 +50,10 @@
|
---|
6 | try:
|
---|
7 | f, path, descr = imp.find_module(part,path)
|
---|
8 | except ImportError,e:
|
---|
9 | - if os.path.basename(os.getcwd()) != part:
|
---|
10 | - raise e
|
---|
11 | + if sys.modules.has_key(part):
|
---|
12 | + path = os.path.realpath(sys.modules[part].__path__[0])
|
---|
13 | + elif os.path.basename(os.getcwd()) != part:
|
---|
14 | + raise e
|
---|
15 |
|
---|
16 | while parts:
|
---|
17 | part = parts.pop()
|
---|