Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #15512 -- Cleanup of imports in contrib.admin. Thanks to Julien…

… Phalip for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 49cfe253991bd255e3293da545ba9af00ab6e18f 1 parent edfed18
@freakboy3742 freakboy3742 authored
View
4 django/contrib/admin/helpers.py
@@ -1,7 +1,7 @@
from django import forms
from django.conf import settings
-from django.contrib.admin.util import flatten_fieldsets, lookup_field
-from django.contrib.admin.util import display_for_field, label_for_field, help_text_for_field
+from django.contrib.admin.util import (flatten_fieldsets, lookup_field,
+ display_for_field, label_for_field, help_text_for_field)
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist
from django.db.models.fields.related import ManyToManyRel
View
7 django/contrib/admin/options.py
@@ -1,10 +1,9 @@
from django import forms, template
from django.forms.formsets import all_valid
-from django.forms.models import modelform_factory, modelformset_factory, inlineformset_factory
-from django.forms.models import BaseInlineFormSet
+from django.forms.models import (modelform_factory, modelformset_factory,
+ inlineformset_factory, BaseInlineFormSet)
from django.contrib.contenttypes.models import ContentType
-from django.contrib.admin import widgets
-from django.contrib.admin import helpers
+from django.contrib.admin import widgets, helpers
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
View
6 django/contrib/admin/sites.py
@@ -1,8 +1,8 @@
import re
from django import http, template
from django.contrib.admin import ModelAdmin, actions
-from django.contrib.admin.forms import AdminAuthenticationForm, ERROR_MESSAGE
-from django.contrib.auth import REDIRECT_FIELD_NAME, authenticate, login
+from django.contrib.admin.forms import AdminAuthenticationForm
+from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.contenttypes import views as contenttype_views
from django.views.decorators.csrf import csrf_protect
from django.db.models.base import ModelBase
@@ -12,7 +12,7 @@
from django.utils.functional import update_wrapper
from django.utils.safestring import mark_safe
from django.utils.text import capfirst
-from django.utils.translation import ugettext_lazy, ugettext as _
+from django.utils.translation import ugettext as _
from django.views.decorators.cache import never_cache
from django.conf import settings
View
4 django/contrib/admin/templatetags/admin_list.py
@@ -2,8 +2,8 @@
from django.conf import settings
from django.contrib.admin.util import lookup_field, display_for_field, label_for_field
-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.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_VALUE,
+ ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR)
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.utils import formats
View
3  django/contrib/admin/util.py
@@ -9,8 +9,7 @@
from django.utils.text import capfirst
from django.utils.encoding import force_unicode, smart_unicode, smart_str
from django.utils.translation import ungettext
-from django.core.urlresolvers import reverse, NoReverseMatch
-from django.utils.datastructures import SortedDict
+from django.core.urlresolvers import reverse
def quote(s):
View
4 django/contrib/admin/validation.py
@@ -4,8 +4,8 @@
from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_model,
_get_foreign_key)
from django.contrib.admin.util import get_fields_from_path, NotRelationField
-from django.contrib.admin.options import flatten_fieldsets, BaseModelAdmin
-from django.contrib.admin.options import HORIZONTAL, VERTICAL
+from django.contrib.admin.options import (flatten_fieldsets, BaseModelAdmin,
+ HORIZONTAL, VERTICAL)
__all__ = ['validate']
View
3  django/contrib/admin/views/decorators.py
@@ -3,10 +3,7 @@
except ImportError:
from django.utils.functional import wraps # Python 2.4 fallback.
-from django import template
-from django.shortcuts import render_to_response
from django.utils.translation import ugettext as _
-
from django.contrib.admin.forms import AdminAuthenticationForm
from django.contrib.auth.views import login
from django.contrib.auth import REDIRECT_FIELD_NAME
View
2  django/contrib/admin/views/main.py
@@ -2,7 +2,7 @@
from django.contrib.admin.options import IncorrectLookupParameters
from django.contrib.admin.util import quote, get_fields_from_path
from django.core.exceptions import SuspiciousOperation
-from django.core.paginator import Paginator, InvalidPage
+from django.core.paginator import InvalidPage
from django.db import models
from django.utils.encoding import force_unicode, smart_str
from django.utils.translation import ugettext, ugettext_lazy
Please sign in to comment.
Something went wrong with that request. Please try again.