Removed several unused imports.

This commit is contained in:
Aymeric Augustin 2013-06-19 17:18:40 +02:00
parent d9a43545be
commit ffcf24c9ce
32 changed files with 7 additions and 46 deletions

View File

@ -1,8 +1,7 @@
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.db.models.fields import FieldDoesNotExist
from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_model,
_get_foreign_key)
from django.forms.models import BaseModelForm, BaseModelFormSet, _get_foreign_key
from django.contrib.admin.util import get_fields_from_path, NotRelationField
"""

View File

@ -17,7 +17,6 @@ from django.utils.importlib import import_module
from django.utils._os import upath
from django.utils import six
from django.utils.translation import ugettext as _
from django.utils.safestring import mark_safe
# Exclude methods starting with these strings from documentation
MODEL_METHODS_EXCLUDE = ('_', 'add_', 'delete', 'save', 'set_')

View File

@ -4,7 +4,6 @@ Creates permissions for all installed apps that need permissions.
from __future__ import unicode_literals
import getpass
import locale
import unicodedata
from django.contrib.auth import models as auth_app, get_user_model

View File

@ -3,7 +3,7 @@ from datetime import datetime
from django.conf import settings
from django.contrib.auth import authenticate
from django.contrib.auth.backends import RemoteUserBackend
from django.contrib.auth.models import User, AnonymousUser
from django.contrib.auth.models import User
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.test import TestCase
from django.utils import timezone

View File

@ -13,7 +13,6 @@ from django.core import mail
from django.core.urlresolvers import reverse, NoReverseMatch
from django.http import QueryDict, HttpRequest
from django.utils.encoding import force_text
from django.utils.html import escape
from django.utils.http import urlquote
from django.utils._os import upath
from django.test import TestCase
@ -23,7 +22,7 @@ from django.contrib.sessions.middleware import SessionMiddleware
from django.contrib.auth import SESSION_KEY, REDIRECT_FIELD_NAME
from django.contrib.auth.forms import (AuthenticationForm, PasswordChangeForm,
SetPasswordForm, PasswordResetForm)
SetPasswordForm)
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.contrib.auth.views import login as login_view

View File

@ -3,7 +3,7 @@ from __future__ import unicode_literals
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.comments.models import Comment
from django.utils.translation import ugettext_lazy as _, ungettext, ungettext_lazy
from django.utils.translation import ugettext_lazy as _, ungettext_lazy
from django.contrib.comments import get_model
from django.contrib.comments.views.moderation import perform_flag, perform_approve, perform_delete

View File

@ -1,5 +1,4 @@
import os
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.test import TestCase, Client

View File

@ -1,5 +1,4 @@
import os
from django.conf import settings
from django.contrib.auth.models import AnonymousUser, User
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.template import Template, Context, TemplateSyntaxError

View File

@ -3,15 +3,11 @@ from __future__ import unicode_literals
import datetime
import os
import pickle
import re
import warnings
from django import http
from django.conf import settings
from django.contrib.formtools import preview, utils
from django.test import TestCase
from django.test.html import parse_html
from django.test.utils import override_settings
from django.utils._os import upath
from django.utils import unittest

View File

@ -1,5 +1,3 @@
import json
from django.test import TestCase
from django.core import signing
from django.core.exceptions import SuspiciousOperation

View File

@ -2,7 +2,6 @@ import logging
from django.forms.widgets import Textarea
from django.template import loader, Context
from django.templatetags.static import static
from django.utils import six
from django.utils import translation

View File

@ -1,5 +1,4 @@
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation
from django.utils.functional import cached_property

View File

@ -1,5 +1,4 @@
from django.db.models import Aggregate
from django.contrib.gis.db.models.sql import GeomField
class Collect(Aggregate):
name = 'Collect'

View File

@ -4,7 +4,6 @@ import binascii
import unittest
from django.contrib.gis import memoryview
from django.utils import six
from django.utils.unittest import skipUnless
from ..import HAS_GEOS

View File

@ -1,4 +1,3 @@
import os
from optparse import make_option
from django.contrib.gis import gdal
from django.core.management.base import LabelCommand, CommandError

View File

@ -1,7 +1,5 @@
from __future__ import absolute_import
from datetime import date
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql, oracle, no_mysql, no_oracle, no_spatialite
from django.test import TestCase

View File

@ -1,4 +1,3 @@
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.db import models

View File

@ -1,7 +1,6 @@
from datetime import datetime
from django.conf.urls import patterns, url
from django.contrib.sitemaps import Sitemap, GenericSitemap, FlatPageSitemap, views
from django.contrib.auth.models import User
from django.views.decorators.cache import cache_page
from django.contrib.sitemaps.tests.base import TestModel

View File

@ -1,7 +1,6 @@
"""
Global Django exception and warning classes.
"""
import logging
from functools import reduce
import operator

View File

@ -3,13 +3,11 @@ import os
import sys
from optparse import OptionParser, NO_DEFAULT
import imp
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import BaseCommand, CommandError, handle_default_options
from django.core.management.color import color_style
from django.utils.importlib import import_module
from django.utils._os import upath
from django.utils import six
# For backwards compatibility: get_version() used to be in this module.

View File

@ -3,7 +3,6 @@ Module for abstract serializer/unserializer base classes.
"""
from django.db import models
from django.utils.encoding import smart_text
from django.utils import six
class SerializerDoesNotExist(KeyError):

View File

@ -6,7 +6,6 @@ Requires psycopg 2: http://initd.org/projects/psycopg2
import logging
import sys
from django.db import utils
from django.db.backends import *
from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations
from django.db.backends.postgresql_psycopg2.client import DatabaseClient
@ -16,7 +15,6 @@ from django.db.backends.postgresql_psycopg2.introspection import DatabaseIntrosp
from django.utils.encoding import force_str
from django.utils.functional import cached_property
from django.utils.safestring import SafeText, SafeBytes
from django.utils import six
from django.utils.timezone import utc
try:

View File

@ -1,5 +1,3 @@
import psycopg2.extensions
from django.db.backends.creation import BaseDatabaseCreation
from django.db.backends.util import truncate_name

View File

@ -4,7 +4,7 @@ from django.core.exceptions import ValidationError
from django.forms import Form
from django.forms.fields import IntegerField, BooleanField
from django.forms.util import ErrorList
from django.forms.widgets import Media, HiddenInput
from django.forms.widgets import HiddenInput
from django.utils.encoding import python_2_unicode_compatible
from django.utils.safestring import mark_safe
from django.utils import six

View File

@ -3,7 +3,6 @@ from __future__ import unicode_literals
from django.conf import settings
from django.utils.html import format_html, format_html_join
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.safestring import mark_safe
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.utils import six

View File

@ -5,7 +5,6 @@ HTML Widget classes
from __future__ import absolute_import, unicode_literals
import copy
import datetime
from itertools import chain
try:
from urllib.parse import urljoin
@ -16,8 +15,8 @@ import warnings
from django.conf import settings
from django.forms.util import flatatt, to_current_timezone
from django.utils.datastructures import MultiValueDict, MergeDict
from django.utils.html import conditional_escape, format_html, format_html_join
from django.utils.translation import ugettext, ugettext_lazy
from django.utils.html import conditional_escape, format_html
from django.utils.translation import ugettext_lazy
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.safestring import mark_safe
from django.utils import datetime_safe, formats, six

View File

@ -6,10 +6,8 @@ against request forgeries from other sites.
"""
from __future__ import unicode_literals
import hashlib
import logging
import re
import random
from django.conf import settings
from django.core.urlresolvers import get_callable

View File

@ -3,7 +3,6 @@ from __future__ import unicode_literals
import re
import random as random_module
import unicodedata
from decimal import Decimal, InvalidOperation, Context, ROUND_HALF_UP
from functools import wraps
from pprint import pformat

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
import re
import string
try:
from urllib.parse import quote, urlsplit, urlunsplit
except ImportError: # Python 2

View File

@ -2,7 +2,6 @@ from __future__ import unicode_literals
import re
import unicodedata
import warnings
from gzip import GzipFile
from io import BytesIO

View File

@ -7,7 +7,6 @@ import sys
import types
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.http import (HttpResponse, HttpResponseServerError,
HttpResponseNotFound, HttpRequest, build_request_repr)
from django.template import Template, Context, TemplateDoesNotExist

View File

@ -1,5 +1,3 @@
import warnings
from django.middleware.csrf import CsrfViewMiddleware, get_token
from django.utils.decorators import decorator_from_middleware, available_attrs
from functools import wraps