Django

Code

Changeset 3206

Show
Ignore:
Timestamp:
06/26/06 04:01:07 (2 years ago)
Author:
mtredinnick
Message:

Fixed #1796 -- implemented more robust normalisation for module filenames
before comparing them. Ivan Saglaev found a case where r3202 did not work
properly.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/models/loading.py

    r3202 r3206  
    9898            # appname.models and project.appname.models). We use the source 
    9999            # filename as a means to detect identity. 
    100             fname1 = os.path.normpath(sys.modules[model.__module__].__file__) 
    101             fname2 = os.path.normpath(sys.modules[model_dict[model_name].__module__].__file__) 
     100            fname1 = os.path.abspath(sys.modules[model.__module__].__file__) 
     101            fname2 = os.path.abspath(sys.modules[model_dict[model_name].__module__].__file__) 
    102102            # Since the filename extension could be .py the first time and .pyc 
    103103            # or .pyo the second time, ignore the extension when comparing.