Changeset 3490
- Timestamp:
- 07/29/06 16:04:41 (2 years ago)
- Files:
-
- django/trunk/django/db/models/base.py (modified) (2 diffs)
- django/trunk/django/db/models/loading.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/db/models/base.py
r3414 r3490 45 45 46 46 # Bail out early if we have already created this class. 47 m = get_model(new_class._meta.app_label, name )47 m = get_model(new_class._meta.app_label, name, False) 48 48 if m is not None: 49 49 return m … … 69 69 # should only be one class for each model, so we must always return the 70 70 # registered version. 71 return get_model(new_class._meta.app_label, name )71 return get_model(new_class._meta.app_label, name, False) 72 72 73 73 class Model(object): django/trunk/django/db/models/loading.py
r3243 r3490 76 76 return model_list 77 77 78 def get_model(app_label, model_name ):78 def get_model(app_label, model_name, seed_cache = True): 79 79 """ 80 Returns the model matching the given app_label and case-insensitive model_name. 80 Returns the model matching the given app_label and case-insensitive 81 model_name. 82 81 83 Returns None if no model is found. 82 84 """ 85 if seed_cache: 86 get_apps() 83 87 try: 84 88 model_dict = _app_models[app_label]
