Ticket #4470: separates_models.diff
File separates_models.diff, 743 bytes (added by , 17 years ago) |
---|
-
db/models/base.py
47 47 # Figure out the app_label by looking one level up. 48 48 # For 'django.contrib.sites.models', this would be 'sites'. 49 49 model_module = sys.modules[new_class.__module__] 50 new_class._meta.app_label = model_module.__name__.split('.')[-2] 50 module_name = model_module.__name__.split('.') 51 new_class._meta.app_label = module_name[module_name.index('models')-1] 51 52 52 53 # Bail out early if we have already created this class. 53 54 m = get_model(new_class._meta.app_label, name, False)