Changeset 3212
- Timestamp:
- 06/26/06 11:20:58 (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
r3168 r3212 10 10 from django.db import connection, backend, transaction 11 11 from django.db.models import signals 12 from django.db.models.loading import register_models 12 from django.db.models.loading import register_models, get_model 13 13 from django.dispatch import dispatcher 14 14 from django.utils.datastructures import SortedDict … … 61 61 62 62 register_models(new_class._meta.app_label, new_class) 63 return new_class 63 # Because of the way imports happen (recursively), we may or may not be 64 # the first class for this model to register with the framework. There 65 # should only be one class for each model, so we must always return the 66 # registered version. 67 return get_model(new_class._meta.app_label, name) 64 68 65 69 class Model(object): django/trunk/django/db/models/loading.py
r3206 r3212 74 74 Returns None if no model is found. 75 75 """ 76 get_apps() # Run get_apps() to populate the _app_list cache. Slightly hackish.77 76 try: 78 77 model_dict = _app_models[app_label]
