Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Russell Keith-Magee authored March 03, 2011
4  django/contrib/admin/helpers.py
... ...
@@ -1,7 +1,7 @@
1 1
 from django import forms
2 2
 from django.conf import settings
3  
-from django.contrib.admin.util import flatten_fieldsets, lookup_field
4  
-from django.contrib.admin.util import display_for_field, label_for_field, help_text_for_field
  3
+from django.contrib.admin.util import (flatten_fieldsets, lookup_field,
  4
+    display_for_field, label_for_field, help_text_for_field)
5 5
 from django.contrib.contenttypes.models import ContentType
6 6
 from django.core.exceptions import ObjectDoesNotExist
7 7
 from django.db.models.fields.related import ManyToManyRel
7  django/contrib/admin/options.py
... ...
@@ -1,10 +1,9 @@
1 1
 from django import forms, template
2 2
 from django.forms.formsets import all_valid
3  
-from django.forms.models import modelform_factory, modelformset_factory, inlineformset_factory
4  
-from django.forms.models import BaseInlineFormSet
  3
+from django.forms.models import (modelform_factory, modelformset_factory,
  4
+    inlineformset_factory, BaseInlineFormSet)
5 5
 from django.contrib.contenttypes.models import ContentType
6  
-from django.contrib.admin import widgets
7  
-from django.contrib.admin import helpers
  6
+from django.contrib.admin import widgets, helpers
8 7
 from django.contrib.admin.util import unquote, flatten_fieldsets, get_deleted_objects, model_format_dict
9 8
 from django.contrib import messages
10 9
 from django.views.decorators.csrf import csrf_protect
6  django/contrib/admin/sites.py
... ...
@@ -1,8 +1,8 @@
1 1
 import re
2 2
 from django import http, template
3 3
 from django.contrib.admin import ModelAdmin, actions
4  
-from django.contrib.admin.forms import AdminAuthenticationForm, ERROR_MESSAGE
5  
-from django.contrib.auth import REDIRECT_FIELD_NAME, authenticate, login
  4
+from django.contrib.admin.forms import AdminAuthenticationForm
  5
+from django.contrib.auth import REDIRECT_FIELD_NAME
6 6
 from django.contrib.contenttypes import views as contenttype_views
7 7
 from django.views.decorators.csrf import csrf_protect
8 8
 from django.db.models.base import ModelBase
@@ -12,7 +12,7 @@
12 12
 from django.utils.functional import update_wrapper
13 13
 from django.utils.safestring import mark_safe
14 14
 from django.utils.text import capfirst
15  
-from django.utils.translation import ugettext_lazy, ugettext as _
  15
+from django.utils.translation import ugettext as _
16 16
 from django.views.decorators.cache import never_cache
17 17
 from django.conf import settings
18 18
 
4  django/contrib/admin/templatetags/admin_list.py
@@ -2,8 +2,8 @@
2 2
 
3 3
 from django.conf import settings
4 4
 from django.contrib.admin.util import lookup_field, display_for_field, label_for_field
5  
-from django.contrib.admin.views.main import ALL_VAR, EMPTY_CHANGELIST_VALUE
6  
-from django.contrib.admin.views.main import ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR
  5
+from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_VALUE,
  6
+    ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR)
7 7
 from django.core.exceptions import ObjectDoesNotExist
8 8
 from django.db import models
9 9
 from django.utils import formats
3  django/contrib/admin/util.py
@@ -9,8 +9,7 @@
9 9
 from django.utils.text import capfirst
10 10
 from django.utils.encoding import force_unicode, smart_unicode, smart_str
11 11
 from django.utils.translation import ungettext
12  
-from django.core.urlresolvers import reverse, NoReverseMatch
13  
-from django.utils.datastructures import SortedDict
  12
+from django.core.urlresolvers import reverse
14 13
 
15 14
 
16 15
 def quote(s):
4  django/contrib/admin/validation.py
@@ -4,8 +4,8 @@
4 4
 from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_model,
5 5
     _get_foreign_key)
6 6
 from django.contrib.admin.util import get_fields_from_path, NotRelationField
7  
-from django.contrib.admin.options import flatten_fieldsets, BaseModelAdmin
8  
-from django.contrib.admin.options import HORIZONTAL, VERTICAL
  7
+from django.contrib.admin.options import (flatten_fieldsets, BaseModelAdmin,
  8
+    HORIZONTAL, VERTICAL)
9 9
 
10 10
 
11 11
 __all__ = ['validate']
3  django/contrib/admin/views/decorators.py
@@ -3,10 +3,7 @@
3 3
 except ImportError:
4 4
     from django.utils.functional import wraps  # Python 2.4 fallback.
5 5
 
6  
-from django import template
7  
-from django.shortcuts import render_to_response
8 6
 from django.utils.translation import ugettext as _
9  
-
10 7
 from django.contrib.admin.forms import AdminAuthenticationForm
11 8
 from django.contrib.auth.views import login
12 9
 from django.contrib.auth import REDIRECT_FIELD_NAME
2  django/contrib/admin/views/main.py
@@ -2,7 +2,7 @@
2 2
 from django.contrib.admin.options import IncorrectLookupParameters
3 3
 from django.contrib.admin.util import quote, get_fields_from_path
4 4
 from django.core.exceptions import SuspiciousOperation
5  
-from django.core.paginator import Paginator, InvalidPage
  5
+from django.core.paginator import InvalidPage
6 6
 from django.db import models
7 7
 from django.utils.encoding import force_unicode, smart_str
8 8
 from django.utils.translation import ugettext, ugettext_lazy

0 notes on commit 49cfe25

Please sign in to comment.
Something went wrong with that request. Please try again.