Ticket #4144: base.py.2.diff

File base.py.2.diff, 769 bytes (added by Marty Alchin <gulopine@…>, 18 years ago)

Proper diff, against revision 5065

  • base.py

     
    4242                new_class._meta.parents.append(base)
    4343                new_class._meta.parents.extend(base._meta.parents)
    4444
    45         model_module = sys.modules[new_class.__module__]
    46 
    4745        if getattr(new_class._meta, 'app_label', None) is None:
    4846            # Figure out the app_label by looking one level up.
    4947            # For 'django.contrib.sites.models', this would be 'sites'.
     48            model_module = sys.modules[new_class.__module__]
    5049            new_class._meta.app_label = model_module.__name__.split('.')[-2]
    5150
    5251        # Bail out early if we have already created this class.
Back to Top