Index: /Users/marc/dev/django/django/db/models/base.py
===================================================================
--- /Users/marc/dev/django/django/db/models/base.py	(revision 4660)
+++ /Users/marc/dev/django/django/db/models/base.py	(working copy)
@@ -37,6 +37,7 @@
                 new_class._meta.parents.extend(base._meta.parents)
 
         model_module = sys.modules[new_class.__module__]
+        model_module_name = model_module.__name__.split('.')[-1]
 
         if getattr(new_class._meta, 'app_label', None) is None:
             # Figure out the app_label by looking one level up.
@@ -44,8 +45,10 @@
             new_class._meta.app_label = model_module.__name__.split('.')[-2]
 
         # Bail out early if we have already created this class.
-        m = get_model(new_class._meta.app_label, name, False)
+        m = get_model(new_class._meta.app_label, model_module_name+'.'+name, False)
         if m is not None:
+            print
+            print m, name, new_class._meta.app_label, model_module.__name__
             return m
 
         # Add all attributes to the class.
@@ -68,7 +71,7 @@
         # the first class for this model to register with the framework. There
         # should only be one class for each model, so we must always return the
         # registered version.
-        return get_model(new_class._meta.app_label, name, False)
+        return get_model(new_class._meta.app_label, model_module_name+'.'+name, False)
 
 class Model(object):
     __metaclass__ = ModelBase
Index: /Users/marc/dev/django/django/db/models/loading.py
===================================================================
--- /Users/marc/dev/django/django/db/models/loading.py	(revision 4660)
+++ /Users/marc/dev/django/django/db/models/loading.py	(working copy)
@@ -107,20 +107,27 @@
     Register a set of models as belonging to an app.
     """
     for model in models:
-        # Store as 'name: model' pair in a dictionary
+        # Store as 'modulename.name: model' pair in a dictionary
         # in the _app_models dictionary
+        module_name = model.__module__.split('.')[-1]
         model_name = model._meta.object_name.lower()
+        key_name = module_name+'.'+model_name
         model_dict = _app_models.setdefault(app_label, {})
         model_list = _app_model_order.setdefault(app_label, [])
         model_list.append(model_name)
-        if model_dict.has_key(model_name):
+        if model_dict.has_key(key_name):
             # 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.abspath(sys.modules[model.__module__].__file__)
-            fname2 = os.path.abspath(sys.modules[model_dict[model_name].__module__].__file__)
+            fname2 = os.path.abspath(sys.modules[model_dict[key_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]:
                 continue
-        model_dict[model_name] = model
+            #if type(model_dict[model_name]) == list:
+            #    model_dict[model_name].append(model)
+            #else:
+            #    model_dict[model_name] = [model_dict[model_name], model]
+        else:
+            model_dict[key_name] = model
Index: /Users/marc/dev/django/django/db/models/fields/generic.py
===================================================================
--- /Users/marc/dev/django/django/db/models/fields/generic.py	(revision 4660)
+++ /Users/marc/dev/django/django/db/models/fields/generic.py	(working copy)
@@ -44,7 +44,7 @@
             
     def get_content_type(self, obj):
         # Convenience function using get_model avoids a circular import when using this model
-        ContentType = get_model("contenttypes", "contenttype")
+        ContentType = get_model("contenttypes", "models.contenttype")
         return ContentType.objects.get_for_model(obj)
         
     def __get__(self, instance, instance_type=None):
Index: /Users/marc/dev/django/django/db/models/fields/related.py
===================================================================
--- /Users/marc/dev/django/django/db/models/fields/related.py	(revision 4660)
+++ /Users/marc/dev/django/django/db/models/fields/related.py	(working copy)
@@ -25,7 +25,7 @@
     key = (module, name)
     # Has the model already been loaded?
     # If so, resolve the string reference right away
-    model = get_model(rel_cls._meta.app_label, field.rel.to, False)
+    model = get_model(rel_cls._meta.app_label, 'models.'+field.rel.to, False)
     if model:
         field.rel.to = model
         field.do_related_class(model, rel_cls)
Index: /Users/marc/dev/django/django/core/serializers/xml_serializer.py
===================================================================
--- /Users/marc/dev/django/django/core/serializers/xml_serializer.py	(revision 4660)
+++ /Users/marc/dev/django/django/core/serializers/xml_serializer.py	(working copy)
@@ -195,7 +195,9 @@
                 "<%s> node is missing the required '%s' attribute" \
                     % (node.nodeName, attr))
         try:
-            Model = models.get_model(*model_identifier.split("."))
+            get_model_args = model_identifier.split(".")
+            get_model_args[1] = 'models.'get_model_args[1]
+            Model = models.get_model(*get_model_args)
         except TypeError:
             Model = None
         if Model is None:
Index: /Users/marc/dev/django/django/core/serializers/python.py
===================================================================
--- /Users/marc/dev/django/django/core/serializers/python.py	(revision 4660)
+++ /Users/marc/dev/django/django/core/serializers/python.py	(working copy)
@@ -93,7 +93,9 @@
     Helper to look up a model from an "app_label.module_name" string.
     """
     try:
-        Model = models.get_model(*model_identifier.split("."))
+        get_model_args = model_identifier.split(".")
+        get_model_args[1] = 'models.'get_model_args[1]
+        Model = models.get_model(*get_model_args)
     except TypeError:
         Model = None
     if Model is None:
Index: /Users/marc/dev/django/django/contrib/admin/views/main.py
===================================================================
--- /Users/marc/dev/django/django/contrib/admin/views/main.py	(revision 4660)
+++ /Users/marc/dev/django/django/contrib/admin/views/main.py	(working copy)
@@ -224,7 +224,7 @@
 index = staff_member_required(never_cache(index))
 
 def add_stage(request, app_label, model_name, show_delete=False, form_url='', post_url=None, post_url_continue='../%s/', object_id_override=None):
-    model = models.get_model(app_label, model_name)
+    model = models.get_model(app_label, 'models.'+model_name)
     if model is None:
         raise Http404("App %r, model %r, not found" % (app_label, model_name))
     opts = model._meta
@@ -299,7 +299,7 @@
 add_stage = staff_member_required(never_cache(add_stage))
 
 def change_stage(request, app_label, model_name, object_id):
-    model = models.get_model(app_label, model_name)
+    model = models.get_model(app_label, 'models.'+model_name)
     object_id = unquote(object_id)
     if model is None:
         raise Http404("App %r, model %r, not found" % (app_label, model_name))
@@ -487,7 +487,7 @@
 
 def delete_stage(request, app_label, model_name, object_id):
     import sets
-    model = models.get_model(app_label, model_name)
+    model = models.get_model(app_label, 'models.'+model_name)
     object_id = unquote(object_id)
     if model is None:
         raise Http404("App %r, model %r, not found" % (app_label, model_name))
@@ -524,7 +524,7 @@
 delete_stage = staff_member_required(never_cache(delete_stage))
 
 def history(request, app_label, model_name, object_id):
-    model = models.get_model(app_label, model_name)
+    model = models.get_model(app_label, 'models.'+model_name)
     object_id = unquote(object_id)
     if model is None:
         raise Http404("App %r, model %r, not found" % (app_label, model_name))
@@ -741,7 +741,7 @@
         return "%s/" % quote(getattr(result, self.pk_attname))
 
 def change_list(request, app_label, model_name):
-    model = models.get_model(app_label, model_name)
+    model = models.get_model(app_label, 'models.'+model_name)
     if model is None:
         raise Http404("App %r, model %r, not found" % (app_label, model_name))
     if not request.user.has_perm(app_label + '.' + model._meta.get_change_permission()):
Index: /Users/marc/dev/django/django/contrib/contenttypes/models.py
===================================================================
--- /Users/marc/dev/django/django/contrib/contenttypes/models.py	(revision 4660)
+++ /Users/marc/dev/django/django/contrib/contenttypes/models.py	(working copy)
@@ -32,7 +32,7 @@
     def model_class(self):
         "Returns the Python model class for this type of content."
         from django.db import models
-        return models.get_model(self.app_label, self.model)
+        return models.get_model(self.app_label, 'models.'+self.model)
 
     def get_object_for_this_type(self, **kwargs):
         """
Index: /Users/marc/dev/django/django/contrib/auth/models.py
===================================================================
--- /Users/marc/dev/django/django/contrib/auth/models.py	(revision 4660)
+++ /Users/marc/dev/django/django/contrib/auth/models.py	(working copy)
@@ -245,7 +245,7 @@
                 raise SiteProfileNotAvailable
             try:
                 app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.')
-                model = models.get_model(app_label, model_name)
+                model = models.get_model(app_label, 'models.'+model_name)
                 self._profile_cache = model._default_manager.get(user__id__exact=self.id)
             except (ImportError, ImproperlyConfigured):
                 raise SiteProfileNotAvailable
