Ticket #4144: base.py.2.diff
File base.py.2.diff, 769 bytes (added by , 18 years ago) |
---|
-
base.py
42 42 new_class._meta.parents.append(base) 43 43 new_class._meta.parents.extend(base._meta.parents) 44 44 45 model_module = sys.modules[new_class.__module__]46 47 45 if getattr(new_class._meta, 'app_label', None) is None: 48 46 # Figure out the app_label by looking one level up. 49 47 # For 'django.contrib.sites.models', this would be 'sites'. 48 model_module = sys.modules[new_class.__module__] 50 49 new_class._meta.app_label = model_module.__name__.split('.')[-2] 51 50 52 51 # Bail out early if we have already created this class.