summaryrefslogtreecommitdiff
path: root/django/db/models/loading.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-06-26 09:01:07 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-06-26 09:01:07 +0000
commitdb366b4a78f3f42ea19232e4c3b27f19e3ebe0c0 (patch)
treeb443db3090a919f3d514edc7746cbed46db57297 /django/db/models/loading.py
parent25ffce4c835e9c739347ac95bba621e46ad2f31b (diff)
downloaddjango-db366b4a78f3f42ea19232e4c3b27f19e3ebe0c0.tar.gz
Fixed #1796 -- implemented more robust normalisation for module filenames
before comparing them. Ivan Saglaev found a case where r3202 did not work properly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/loading.py')
-rw-r--r--django/db/models/loading.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/loading.py b/django/db/models/loading.py
index 3602090650..56e7d55652 100644
--- a/django/db/models/loading.py
+++ b/django/db/models/loading.py
@@ -97,8 +97,8 @@ def register_models(app_label, *models):
# The same model may be imported via different paths (e.g.
# appname.models and project.appname.models). We use the source
# filename as a means to detect identity.
- fname1 = os.path.normpath(sys.modules[model.__module__].__file__)
- fname2 = os.path.normpath(sys.modules[model_dict[model_name].__module__].__file__)
+ fname1 = os.path.abspath(sys.modules[model.__module__].__file__)
+ fname2 = os.path.abspath(sys.modules[model_dict[model_name].__module__].__file__)
# Since the filename extension could be .py the first time and .pyc
# or .pyo the second time, ignore the extension when comparing.
if os.path.splitext(fname1)[0] == os.path.splitext(fname2)[0]: