              # For 'django.contrib.sites.models', this would be 'sites'.
              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)
          if m is not None:
              return m
  
          # Add all attributes to the class.
          for obj_name, obj in attrs.items():
 
</s> remove         return get_model(new_class._meta.app_label, name)
 </s> add         return get_model(new_class._meta.app_label, name, False) </s> remove def get_model(app_label, model_name):
 </s> add def get_model(app_label, model_name, seed_cache = True): </s> remove     Returns the model matching the given app_label and case-insensitive model_name.
 </s> add     Returns the model matching the given app_label and case-insensitive
    model_name.

        m = get_model(new_class._meta.app_label, name, False)
              # For 'django.contrib.sites.models', this would be 'sites'.
              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)
          if m is not None:
              return m
  
          # Add all attributes to the class.
          for obj_name, obj in attrs.items():
keep keep keep keep replace keep keep keep keep keep
 Seed the global app cache in a call to db.models.get_model() except when we are
constructing a model class. Refs #2348.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3490 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/db/models/base.py