Ticket #7702: 7702-against-7875.patch

File 7702-against-7875.patch, 2.3 KB (added by Honza Král, 16 years ago)
  • django/contrib/admin/options.py

    commit aa3ad06729bae1f38a32f0783699f312f920dee7
    Author: Honza Král <Honza.Kral@gmail.com>
    Date:   Mon Jan 28 22:11:19 2008 +0100
    
        Removed superfluous imports
    
    diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
    index b83b68c..4c7d83b 100644
    a b class ModelAdmin(BaseModelAdmin):  
    257257        # Check that LogEntry, ContentType and the auth context processor are installed.
    258258        from django.conf import settings
    259259        if settings.DEBUG:
    260             from django.contrib.contenttypes.models import ContentType
    261260            from django.contrib.admin.models import LogEntry
    262261            if not LogEntry._meta.installed:
    263262                raise ImproperlyConfigured("Put 'django.contrib.admin' in your INSTALLED_APPS setting in order to use the admin application.")
    class ModelAdmin(BaseModelAdmin):  
    360359        `form` is a bound Form instance that's verified to be valid.
    361360        """
    362361        from django.contrib.admin.models import LogEntry, ADDITION
    363         from django.contrib.contenttypes.models import ContentType
    364362        opts = model._meta
    365363        new_object = form.save(commit=True)
    366364
    class ModelAdmin(BaseModelAdmin):  
    410408        `formsets` is a sequence of InlineFormSet instances that are verified to be valid.
    411409        """
    412410        from django.contrib.admin.models import LogEntry, CHANGE
    413         from django.contrib.contenttypes.models import ContentType
    414411        opts = model._meta
    415412        new_object = form.save(commit=True)
    416413        pk_value = new_object._get_pk_val()
    class ModelAdmin(BaseModelAdmin):  
    657654
    658655    def delete_view(self, request, object_id, extra_context=None):
    659656        "The 'delete' admin view for this model."
    660         from django.contrib.contenttypes.models import ContentType
    661657        from django.contrib.admin.models import LogEntry, DELETION
    662658        opts = self.model._meta
    663659        app_label = opts.app_label
    class ModelAdmin(BaseModelAdmin):  
    711707
    712708    def history_view(self, request, object_id, extra_context=None):
    713709        "The 'history' admin view for this model."
    714         from django.contrib.contenttypes.models import ContentType
    715710        from django.contrib.admin.models import LogEntry
    716711        model = self.model
    717712        opts = model._meta
Back to Top