Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

newforms-admin: Fixed #7702 -- Removed redundant imports in django/co…

…ntrib/admin/options.py. Thanks, Honza

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7919 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f3cda0b77afb2a6e22520b4c9f1c6d111add6ac9 1 parent 60c060c
@adrianholovaty adrianholovaty authored
Showing with 0 additions and 5 deletions.
  1. +0 −5 django/contrib/admin/options.py
View
5 django/contrib/admin/options.py
@@ -257,7 +257,6 @@ def __call__(self, request, url):
# 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 @@ def save_add(self, request, model, form, formsets, post_url_continue):
`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 @@ def save_change(self, request, model, form, formsets=None):
`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 changelist_view(self, request, extra_context=None):
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 delete_view(self, request, object_id, extra_context=None):
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
Please sign in to comment.
Something went wrong with that request. Please try again.