diff --git a/django/contrib/admin/__init__.py b/django/contrib/admin/__init__.py index 92886ab8d3..25a565107f 100644 --- a/django/contrib/admin/__init__.py +++ b/django/contrib/admin/__init__.py @@ -1,4 +1,3 @@ -from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInline from django.contrib.admin.sites import AdminSite, site diff --git a/django/contrib/admin/actions.py b/django/contrib/admin/actions.py index b75c91b75a..87826be29a 100644 --- a/django/contrib/admin/actions.py +++ b/django/contrib/admin/actions.py @@ -8,9 +8,6 @@ from django.contrib.admin import helpers from django.contrib.admin.util import get_deleted_objects, model_ngettext from django.shortcuts import render_to_response from django.utils.encoding import force_unicode -from django.utils.html import escape -from django.utils.safestring import mark_safe -from django.utils.text import capfirst from django.utils.translation import ugettext_lazy, ugettext as _ def delete_selected(modeladmin, request, queryset): diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py index 6bcaf80248..1f6d6de552 100644 --- a/django/contrib/admin/helpers.py +++ b/django/contrib/admin/helpers.py @@ -4,7 +4,6 @@ from django.contrib.admin.util import flatten_fieldsets, lookup_field from django.contrib.admin.util import display_for_field, label_for_field from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist -from django.db.models.fields import FieldDoesNotExist from django.db.models.fields.related import ManyToManyRel from django.forms.util import flatatt from django.template.defaultfilters import capfirst diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 3b6e2b794e..ba89bae6d2 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -5,7 +5,7 @@ from django.forms.models import BaseInlineFormSet from django.contrib.contenttypes.models import ContentType from django.contrib.admin import widgets from django.contrib.admin import helpers -from django.contrib.admin.util import unquote, flatten_fieldsets, get_deleted_objects, model_ngettext, model_format_dict +from django.contrib.admin.util import unquote, flatten_fieldsets, get_deleted_objects, model_format_dict from django.contrib import messages from django.views.decorators.csrf import csrf_protect from django.core.exceptions import PermissionDenied, ValidationError @@ -21,7 +21,7 @@ from django.utils.safestring import mark_safe from django.utils.functional import curry from django.utils.text import capfirst, get_text_list from django.utils.translation import ugettext as _ -from django.utils.translation import ungettext, ugettext_lazy +from django.utils.translation import ungettext from django.utils.encoding import force_unicode HORIZONTAL, VERTICAL = 1, 2 diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py index c05af0b7fe..b24f133124 100644 --- a/django/contrib/admin/templatetags/admin_list.py +++ b/django/contrib/admin/templatetags/admin_list.py @@ -6,7 +6,6 @@ from django.contrib.admin.views.main import ALL_VAR, EMPTY_CHANGELIST_VALUE from django.contrib.admin.views.main import ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR from django.core.exceptions import ObjectDoesNotExist from django.db import models -from django.forms.forms import pretty_name from django.utils import formats from django.utils.html import escape, conditional_escape from django.utils.safestring import mark_safe diff --git a/django/contrib/admin/util.py b/django/contrib/admin/util.py index 776a6f0f42..e606f9f28a 100644 --- a/django/contrib/admin/util.py +++ b/django/contrib/admin/util.py @@ -1,4 +1,3 @@ -from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.forms.forms import pretty_name from django.utils import formats @@ -6,7 +5,7 @@ from django.utils.html import escape from django.utils.safestring import mark_safe from django.utils.text import capfirst from django.utils.encoding import force_unicode, smart_unicode, smart_str -from django.utils.translation import ungettext, ugettext as _ +from django.utils.translation import ungettext from django.core.urlresolvers import reverse, NoReverseMatch from django.utils.datastructures import SortedDict diff --git a/django/contrib/admin/validation.py b/django/contrib/admin/validation.py index 8d7a8c9d74..0434fc64f7 100644 --- a/django/contrib/admin/validation.py +++ b/django/contrib/admin/validation.py @@ -4,7 +4,6 @@ from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_mod _get_foreign_key) from django.contrib.admin.options import flatten_fieldsets, BaseModelAdmin from django.contrib.admin.options import HORIZONTAL, VERTICAL -from django.contrib.admin.util import lookup_field __all__ = ['validate'] diff --git a/django/contrib/admin/views/decorators.py b/django/contrib/admin/views/decorators.py index afdc07589d..67f82edabc 100644 --- a/django/contrib/admin/views/decorators.py +++ b/django/contrib/admin/views/decorators.py @@ -1,11 +1,9 @@ -import base64 try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback. from django import http, template -from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from django.shortcuts import render_to_response diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index 8c09c10ab3..e29d44a67c 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -3,7 +3,6 @@ from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.util import quote from django.core.paginator import Paginator, InvalidPage from django.db import models -from django.db.models.query import QuerySet from django.utils.encoding import force_unicode, smart_str from django.utils.translation import ugettext from django.utils.http import urlencode