Author: adrian
Date: 2008-07-13 12:26:43 -0500 (Sun, 13 Jul 2008)
New Revision: 7919

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

Modified: django/branches/newforms-admin/django/contrib/admin/options.py
===================================================================
--- django/branches/newforms-admin/django/contrib/admin/options.py      
2008-07-13 14:31:09 UTC (rev 7918)
+++ django/branches/newforms-admin/django/contrib/admin/options.py      
2008-07-13 17:26:43 UTC (rev 7919)
@@ -257,7 +257,6 @@
         # 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.")
@@ -360,7 +359,6 @@
         `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)
 
@@ -410,7 +408,6 @@
         `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()
@@ -659,7 +656,6 @@
 
     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
@@ -713,7 +709,6 @@
 
     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


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to