Removed several unused imports.
This commit is contained in:
parent
d9a43545be
commit
ffcf24c9ce
|
@ -1,8 +1,7 @@
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.db.models.fields import FieldDoesNotExist
|
from django.db.models.fields import FieldDoesNotExist
|
||||||
from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_model,
|
from django.forms.models import BaseModelForm, BaseModelFormSet, _get_foreign_key
|
||||||
_get_foreign_key)
|
|
||||||
from django.contrib.admin.util import get_fields_from_path, NotRelationField
|
from django.contrib.admin.util import get_fields_from_path, NotRelationField
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -17,7 +17,6 @@ from django.utils.importlib import import_module
|
||||||
from django.utils._os import upath
|
from django.utils._os import upath
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
from django.utils.safestring import mark_safe
|
|
||||||
|
|
||||||
# Exclude methods starting with these strings from documentation
|
# Exclude methods starting with these strings from documentation
|
||||||
MODEL_METHODS_EXCLUDE = ('_', 'add_', 'delete', 'save', 'set_')
|
MODEL_METHODS_EXCLUDE = ('_', 'add_', 'delete', 'save', 'set_')
|
||||||
|
|
|
@ -4,7 +4,6 @@ Creates permissions for all installed apps that need permissions.
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import getpass
|
import getpass
|
||||||
import locale
|
|
||||||
import unicodedata
|
import unicodedata
|
||||||
|
|
||||||
from django.contrib.auth import models as auth_app, get_user_model
|
from django.contrib.auth import models as auth_app, get_user_model
|
||||||
|
|
|
@ -3,7 +3,7 @@ from datetime import datetime
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth import authenticate
|
from django.contrib.auth import authenticate
|
||||||
from django.contrib.auth.backends import RemoteUserBackend
|
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.contrib.auth.tests.utils import skipIfCustomUser
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
|
@ -13,7 +13,6 @@ from django.core import mail
|
||||||
from django.core.urlresolvers import reverse, NoReverseMatch
|
from django.core.urlresolvers import reverse, NoReverseMatch
|
||||||
from django.http import QueryDict, HttpRequest
|
from django.http import QueryDict, HttpRequest
|
||||||
from django.utils.encoding import force_text
|
from django.utils.encoding import force_text
|
||||||
from django.utils.html import escape
|
|
||||||
from django.utils.http import urlquote
|
from django.utils.http import urlquote
|
||||||
from django.utils._os import upath
|
from django.utils._os import upath
|
||||||
from django.test import TestCase
|
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 import SESSION_KEY, REDIRECT_FIELD_NAME
|
||||||
from django.contrib.auth.forms import (AuthenticationForm, PasswordChangeForm,
|
from django.contrib.auth.forms import (AuthenticationForm, PasswordChangeForm,
|
||||||
SetPasswordForm, PasswordResetForm)
|
SetPasswordForm)
|
||||||
from django.contrib.auth.tests.utils import skipIfCustomUser
|
from django.contrib.auth.tests.utils import skipIfCustomUser
|
||||||
from django.contrib.auth.views import login as login_view
|
from django.contrib.auth.views import login as login_view
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
from django.contrib.comments.models import Comment
|
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 import get_model
|
||||||
from django.contrib.comments.views.moderation import perform_flag, perform_approve, perform_delete
|
from django.contrib.comments.views.moderation import perform_flag, perform_approve, perform_delete
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import os
|
import os
|
||||||
from django.conf import settings
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.contrib.auth.tests.utils import skipIfCustomUser
|
from django.contrib.auth.tests.utils import skipIfCustomUser
|
||||||
from django.test import TestCase, Client
|
from django.test import TestCase, Client
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import os
|
import os
|
||||||
from django.conf import settings
|
|
||||||
from django.contrib.auth.models import AnonymousUser, User
|
from django.contrib.auth.models import AnonymousUser, User
|
||||||
from django.contrib.auth.tests.utils import skipIfCustomUser
|
from django.contrib.auth.tests.utils import skipIfCustomUser
|
||||||
from django.template import Template, Context, TemplateSyntaxError
|
from django.template import Template, Context, TemplateSyntaxError
|
||||||
|
|
|
@ -3,15 +3,11 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import pickle
|
|
||||||
import re
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from django import http
|
from django import http
|
||||||
from django.conf import settings
|
|
||||||
from django.contrib.formtools import preview, utils
|
from django.contrib.formtools import preview, utils
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.test.html import parse_html
|
|
||||||
from django.test.utils import override_settings
|
from django.test.utils import override_settings
|
||||||
from django.utils._os import upath
|
from django.utils._os import upath
|
||||||
from django.utils import unittest
|
from django.utils import unittest
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import json
|
|
||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.core import signing
|
from django.core import signing
|
||||||
from django.core.exceptions import SuspiciousOperation
|
from django.core.exceptions import SuspiciousOperation
|
||||||
|
|
|
@ -2,7 +2,6 @@ import logging
|
||||||
|
|
||||||
from django.forms.widgets import Textarea
|
from django.forms.widgets import Textarea
|
||||||
from django.template import loader, Context
|
from django.template import loader, Context
|
||||||
from django.templatetags.static import static
|
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.utils import translation
|
from django.utils import translation
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
|
||||||
from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation
|
from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
from django.db.models import Aggregate
|
from django.db.models import Aggregate
|
||||||
from django.contrib.gis.db.models.sql import GeomField
|
|
||||||
|
|
||||||
class Collect(Aggregate):
|
class Collect(Aggregate):
|
||||||
name = 'Collect'
|
name = 'Collect'
|
||||||
|
|
|
@ -4,7 +4,6 @@ import binascii
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from django.contrib.gis import memoryview
|
from django.contrib.gis import memoryview
|
||||||
from django.utils import six
|
|
||||||
from django.utils.unittest import skipUnless
|
from django.utils.unittest import skipUnless
|
||||||
|
|
||||||
from ..import HAS_GEOS
|
from ..import HAS_GEOS
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import os
|
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
from django.contrib.gis import gdal
|
from django.contrib.gis import gdal
|
||||||
from django.core.management.base import LabelCommand, CommandError
|
from django.core.management.base import LabelCommand, CommandError
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from datetime import date
|
|
||||||
|
|
||||||
from django.contrib.gis.geos import HAS_GEOS
|
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.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql, oracle, no_mysql, no_oracle, no_spatialite
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.contrib.sites.models import Site
|
from django.contrib.sites.models import Site
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from django.conf.urls import patterns, url
|
from django.conf.urls import patterns, url
|
||||||
from django.contrib.sitemaps import Sitemap, GenericSitemap, FlatPageSitemap, views
|
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.views.decorators.cache import cache_page
|
||||||
|
|
||||||
from django.contrib.sitemaps.tests.base import TestModel
|
from django.contrib.sitemaps.tests.base import TestModel
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""
|
"""
|
||||||
Global Django exception and warning classes.
|
Global Django exception and warning classes.
|
||||||
"""
|
"""
|
||||||
import logging
|
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
import operator
|
import operator
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,11 @@ import os
|
||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser, NO_DEFAULT
|
from optparse import OptionParser, NO_DEFAULT
|
||||||
import imp
|
import imp
|
||||||
import warnings
|
|
||||||
|
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
from django.core.management.base import BaseCommand, CommandError, handle_default_options
|
from django.core.management.base import BaseCommand, CommandError, handle_default_options
|
||||||
from django.core.management.color import color_style
|
from django.core.management.color import color_style
|
||||||
from django.utils.importlib import import_module
|
from django.utils.importlib import import_module
|
||||||
from django.utils._os import upath
|
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
|
|
||||||
# For backwards compatibility: get_version() used to be in this module.
|
# For backwards compatibility: get_version() used to be in this module.
|
||||||
|
|
|
@ -3,7 +3,6 @@ Module for abstract serializer/unserializer base classes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.encoding import smart_text
|
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
|
|
||||||
class SerializerDoesNotExist(KeyError):
|
class SerializerDoesNotExist(KeyError):
|
||||||
|
|
|
@ -6,7 +6,6 @@ Requires psycopg 2: http://initd.org/projects/psycopg2
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from django.db import utils
|
|
||||||
from django.db.backends import *
|
from django.db.backends import *
|
||||||
from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations
|
from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations
|
||||||
from django.db.backends.postgresql_psycopg2.client import DatabaseClient
|
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.encoding import force_str
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.safestring import SafeText, SafeBytes
|
from django.utils.safestring import SafeText, SafeBytes
|
||||||
from django.utils import six
|
|
||||||
from django.utils.timezone import utc
|
from django.utils.timezone import utc
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import psycopg2.extensions
|
|
||||||
|
|
||||||
from django.db.backends.creation import BaseDatabaseCreation
|
from django.db.backends.creation import BaseDatabaseCreation
|
||||||
from django.db.backends.util import truncate_name
|
from django.db.backends.util import truncate_name
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ from django.core.exceptions import ValidationError
|
||||||
from django.forms import Form
|
from django.forms import Form
|
||||||
from django.forms.fields import IntegerField, BooleanField
|
from django.forms.fields import IntegerField, BooleanField
|
||||||
from django.forms.util import ErrorList
|
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.encoding import python_2_unicode_compatible
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
|
|
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.utils.html import format_html, format_html_join
|
from django.utils.html import format_html, format_html_join
|
||||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
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 import timezone
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
|
|
|
@ -5,7 +5,6 @@ HTML Widget classes
|
||||||
from __future__ import absolute_import, unicode_literals
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import datetime
|
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
try:
|
try:
|
||||||
from urllib.parse import urljoin
|
from urllib.parse import urljoin
|
||||||
|
@ -16,8 +15,8 @@ import warnings
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.forms.util import flatatt, to_current_timezone
|
from django.forms.util import flatatt, to_current_timezone
|
||||||
from django.utils.datastructures import MultiValueDict, MergeDict
|
from django.utils.datastructures import MultiValueDict, MergeDict
|
||||||
from django.utils.html import conditional_escape, format_html, format_html_join
|
from django.utils.html import conditional_escape, format_html
|
||||||
from django.utils.translation import ugettext, ugettext_lazy
|
from django.utils.translation import ugettext_lazy
|
||||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
from django.utils.encoding import force_text, python_2_unicode_compatible
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from django.utils import datetime_safe, formats, six
|
from django.utils import datetime_safe, formats, six
|
||||||
|
|
|
@ -6,10 +6,8 @@ against request forgeries from other sites.
|
||||||
"""
|
"""
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import hashlib
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import random
|
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.urlresolvers import get_callable
|
from django.core.urlresolvers import get_callable
|
||||||
|
|
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import random as random_module
|
import random as random_module
|
||||||
import unicodedata
|
|
||||||
from decimal import Decimal, InvalidOperation, Context, ROUND_HALF_UP
|
from decimal import Decimal, InvalidOperation, Context, ROUND_HALF_UP
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import string
|
|
||||||
try:
|
try:
|
||||||
from urllib.parse import quote, urlsplit, urlunsplit
|
from urllib.parse import quote, urlsplit, urlunsplit
|
||||||
except ImportError: # Python 2
|
except ImportError: # Python 2
|
||||||
|
|
|
@ -2,7 +2,6 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import unicodedata
|
import unicodedata
|
||||||
import warnings
|
|
||||||
from gzip import GzipFile
|
from gzip import GzipFile
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import sys
|
||||||
import types
|
import types
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
|
||||||
from django.http import (HttpResponse, HttpResponseServerError,
|
from django.http import (HttpResponse, HttpResponseServerError,
|
||||||
HttpResponseNotFound, HttpRequest, build_request_repr)
|
HttpResponseNotFound, HttpRequest, build_request_repr)
|
||||||
from django.template import Template, Context, TemplateDoesNotExist
|
from django.template import Template, Context, TemplateDoesNotExist
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import warnings
|
|
||||||
|
|
||||||
from django.middleware.csrf import CsrfViewMiddleware, get_token
|
from django.middleware.csrf import CsrfViewMiddleware, get_token
|
||||||
from django.utils.decorators import decorator_from_middleware, available_attrs
|
from django.utils.decorators import decorator_from_middleware, available_attrs
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
Loading…
Reference in New Issue