Commits

Anonymous committed 150a719

newforms-admin: Fixed #7702 -- Removed redundant imports in django/contrib/admin/options.py. Thanks, Honza

Comments (0)

Files changed (1)

django/contrib/admin/options.py

         # Check that LogEntry, ContentType and the auth context processor are installed.
         from django.conf import settings
         if settings.DEBUG:
-            from django.contrib.contenttypes.models import ContentType
             from django.contrib.admin.models import LogEntry
             if not LogEntry._meta.installed:
                 raise ImproperlyConfigured("Put 'django.contrib.admin' in your INSTALLED_APPS setting in order to use the admin application.")
         `form` is a bound Form instance that's verified to be valid.
         """
         from django.contrib.admin.models import LogEntry, ADDITION
-        from django.contrib.contenttypes.models import ContentType
         opts = model._meta
         new_object = form.save(commit=True)
 
         `formsets` is a sequence of InlineFormSet instances that are verified to be valid.
         """
         from django.contrib.admin.models import LogEntry, CHANGE
-        from django.contrib.contenttypes.models import ContentType
         opts = model._meta
         new_object = form.save(commit=True)
         pk_value = new_object._get_pk_val()
 
     def delete_view(self, request, object_id, extra_context=None):
         "The 'delete' admin view for this model."
-        from django.contrib.contenttypes.models import ContentType
         from django.contrib.admin.models import LogEntry, DELETION
         opts = self.model._meta
         app_label = opts.app_label
 
     def history_view(self, request, object_id, extra_context=None):
         "The 'history' admin view for this model."
-        from django.contrib.contenttypes.models import ContentType
         from django.contrib.admin.models import LogEntry
         model = self.model
         opts = model._meta