Ticket #7847: unused.imports.r8002.diff

File unused.imports.r8002.diff, 18.9 KB (added by Julien Phalip, 16 years ago)

First patch was not rendered properly

  • django/django/db/models/sql/query.py

     
    77all about the internals of models in order to get the information it needs.
    88"""
    99
    10 import datetime
    1110from copy import deepcopy
    1211
    1312from django.utils.tree import Node
  • django/django/db/models/base.py

     
    1212import django.db.models.manager         # Ditto.
    1313from django.core import validators
    1414from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, FieldError
    15 from django.db.models.fields import AutoField, ImageField, FieldDoesNotExist
     15from django.db.models.fields import AutoField, ImageField
    1616from django.db.models.fields.related import OneToOneRel, ManyToOneRel, OneToOneField
    1717from django.db.models.query import delete_objects, Q, CollectedObjects
    1818from django.db.models.options import Options
     
    2020from django.db.models import signals
    2121from django.db.models.loading import register_models, get_model
    2222from django.dispatch import dispatcher
    23 from django.utils.datastructures import SortedDict
    2423from django.utils.functional import curry
    2524from django.utils.encoding import smart_str, force_unicode, smart_unicode
    2625from django.core.files.move import file_move_safe
  • django/django/db/models/fields/related.py

     
    33from django.db.models.fields import AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist
    44from django.db.models.related import RelatedObject
    55from django.db.models.query_utils import QueryWrapper
    6 from django.utils.text import capfirst
    76from django.utils.translation import ugettext_lazy, string_concat, ungettext, ugettext as _
    87from django.utils.functional import curry
    9 from django.utils.encoding import smart_unicode
    108from django.core import validators
    119from django import oldforms
    1210from django import forms
  • django/django/db/models/__init__.py

     
    1010from django.db.models.fields.subclassing import SubfieldBase
    1111from django.db.models.fields.related import ForeignKey, OneToOneField, ManyToManyField, ManyToOneRel, ManyToManyRel, OneToOneRel, TABULAR, STACKED
    1212from django.db.models import signals
    13 from django.utils.functional import curry
    14 from django.utils.text import capfirst
    1513
    1614# Admin stages.
    1715ADD, CHANGE, BOTH = 1, 2, 3
  • django/django/db/backends/oracle/base.py

     
    88
    99from django.db.backends import BaseDatabaseWrapper, BaseDatabaseFeatures, BaseDatabaseOperations, util
    1010from django.db.backends.oracle import query
    11 from django.utils.datastructures import SortedDict
    1211from django.utils.encoding import smart_str, force_unicode
    1312
    1413# Oracle takes client-side character set encoding from the environment.
  • django/django/forms/util.py

     
    11from django.utils.html import escape
    22from django.utils.encoding import smart_unicode, StrAndUnicode, force_unicode
    3 from django.utils.functional import Promise
    43from django.utils.safestring import mark_safe
    54
    65def flatatt(attrs):
  • django/django/forms/formsets.py

     
    22from django.utils.encoding import StrAndUnicode
    33from django.utils.safestring import mark_safe
    44from fields import IntegerField, BooleanField
    5 from widgets import Media, HiddenInput, TextInput
     5from widgets import Media, HiddenInput
    66from util import ErrorList, ValidationError
    77
    88__all__ = ('BaseFormSet', 'all_valid')
  • django/django/forms/models.py

     
    88from django.utils.translation import ugettext_lazy as _
    99from django.utils.encoding import smart_unicode
    1010from django.utils.datastructures import SortedDict
    11 from django.core.exceptions import ImproperlyConfigured
    1211
    1312from util import ValidationError, ErrorList
    1413from forms import BaseForm, get_declared_fields
  • django/django/forms/fields.py

     
    2323    from sets import Set as set
    2424
    2525from django.utils.translation import ugettext_lazy as _
    26 from django.utils.encoding import StrAndUnicode, smart_unicode, smart_str
     26from django.utils.encoding import smart_unicode, smart_str
    2727
    2828from util import ErrorList, ValidationError
    2929from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, FileInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple, DateTimeInput
  • django/django/core/files/uploadhandler.py

     
    11"""
    22Base file upload handler classes, and the built-in concrete subclasses
    33"""
    4 import os
    5 import tempfile
    64try:
    75    from cStringIO import StringIO
    86except ImportError:
  • django/django/core/management/commands/compilemessages.py

     
    22import sys
    33from optparse import make_option
    44from django.core.management.base import BaseCommand
    5 from django.core.management.color import no_style
    65
    76try:
    87    set
  • django/django/core/management/commands/testserver.py

     
    1717    requires_model_validation = False
    1818
    1919    def handle(self, *fixture_labels, **options):
    20         from django.conf import settings
    2120        from django.core.management import call_command
    2221        from django.test.utils import create_test_db
    2322
  • django/django/core/management/commands/test.py

     
    1717
    1818    def handle(self, *test_labels, **options):
    1919        from django.conf import settings
    20         from django.db.models import get_app, get_apps
    2120
    2221        verbosity = int(options.get('verbosity', 1))
    2322        interactive = options.get('interactive', True)
  • django/django/views/generic/simple.py

     
    1 from django.shortcuts import render_to_response
    21from django.template import loader, RequestContext
    32from django.http import HttpResponse, HttpResponsePermanentRedirect, HttpResponseGone
    43
  • django/django/dispatch/saferef.py

     
    11"""Refactored "safe reference" from dispatcher.py"""
    22import weakref, traceback
    3 from django.utils.functional import curry
    43
    54def safeRef(target, onDelete = None):
    65    """Return a *safe* weak reference to a callable target
  • django/django/dispatch/dispatcher.py

     
    2525        deletion, (considerably speeds up the cleanup process
    2626        vs. the original code.)
    2727"""
    28 import types, weakref
     28import weakref
    2929from django.dispatch import saferef, robustapply, errors
    3030
    3131__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
  • django/django/contrib/formtools/tests.py

     
    11from django import forms
    22from django.contrib.formtools import preview
    33from django import http
    4 from django.conf import settings
    54from django.test import TestCase
    65
    76success_string = "Done was called!"
  • django/django/contrib/syndication/feeds.py

     
    11from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
    2 from django.template import Context, loader, Template, TemplateDoesNotExist
     2from django.template import loader, Template, TemplateDoesNotExist
    33from django.contrib.sites.models import Site, RequestSite
    44from django.utils import feedgenerator
    55from django.utils.encoding import smart_unicode, iri_to_uri
  • django/django/contrib/admin/views/main.py

     
    66from django.db.models.query import QuerySet
    77from django.utils.encoding import force_unicode, smart_str
    88from django.utils.translation import ugettext
    9 from django.utils.safestring import mark_safe
    109from django.utils.http import urlencode
    1110import operator
    1211
  • django/django/contrib/databrowse/plugins/calendars.py

     
    44from django.contrib.databrowse.sites import DatabrowsePlugin
    55from django.shortcuts import render_to_response
    66from django.utils.text import capfirst
    7 from django.utils.translation import get_date_formats
    87from django.utils.encoding import force_unicode
    98from django.utils.safestring import mark_safe
    109from django.views.generic import date_based
  • django/django/contrib/databrowse/plugins/fieldchoices.py

     
    66from django.utils.text import capfirst
    77from django.utils.encoding import smart_str, force_unicode
    88from django.utils.safestring import mark_safe
    9 from django.views.generic import date_based
    109import urllib
    1110
    1211class FieldChoicePlugin(DatabrowsePlugin):
  • django/django/contrib/databrowse/views.py

     
    1 from django.db.models import FieldDoesNotExist, DateTimeField
    21from django.http import Http404
    32from django.shortcuts import render_to_response
    4 from django.contrib.databrowse.datastructures import EasyModel, EasyChoice
    53
    64###########
    75# CHOICES #
  • django/django/contrib/databrowse/sites.py

     
    11from django import http
    22from django.db import models
    3 from django.contrib.databrowse.datastructures import EasyModel, EasyChoice
     3from django.contrib.databrowse.datastructures import EasyModel
    44from django.shortcuts import render_to_response
    55from django.utils.safestring import mark_safe
    66
  • django/django/contrib/auth/decorators.py

     
    11try:
    22    from functools import wraps, update_wrapper
    33except ImportError:
    4     from django.utils.functional import wraps, update_wrapper  # Python 2.3, 2.4 fallback.
     4    from django.utils.functional import update_wrapper  # Python 2.3, 2.4 fallback.
    55
    66from django.contrib.auth import REDIRECT_FIELD_NAME
    77from django.http import HttpResponseRedirect
  • django/django/contrib/auth/forms.py

     
    22from django.contrib.auth import authenticate
    33from django.contrib.sites.models import Site
    44from django.template import Context, loader
    5 from django.core import validators
    65from django import forms
    76from django.utils.translation import ugettext_lazy as _
    87
  • django/django/contrib/admindocs/views.py

     
    55from django.db import models
    66from django.shortcuts import render_to_response
    77from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist
    8 from django.http import Http404, get_host
     8from django.http import Http404
    99from django.core import urlresolvers
    1010from django.contrib.admindocs import utils
    1111from django.contrib.sites.models import Site
  • django/django/contrib/sessions/backends/cache.py

     
    1 from django.conf import settings
    21from django.contrib.sessions.backends.base import SessionBase
    32from django.core.cache import cache
    43
  • django/django/contrib/sessions/backends/db.py

     
    11import datetime
    22
    3 from django.conf import settings
    43from django.contrib.sessions.models import Session
    54from django.contrib.sessions.backends.base import SessionBase
    65from django.core.exceptions import SuspiciousOperation
  • django/django/utils/dateformat.py

     
    1313
    1414from django.utils.dates import MONTHS, MONTHS_3, MONTHS_AP, WEEKDAYS, WEEKDAYS_ABBR
    1515from django.utils.tzinfo import LocalTimezone
    16 from django.utils.translation import string_concat, ugettext as _
     16from django.utils.translation import ugettext as _
    1717from django.utils.encoding import force_unicode
    1818from calendar import isleap, monthrange
    1919import re, time
  • django/django/utils/encoding.py

     
    33import datetime
    44
    55from django.utils.functional import Promise
    6 from django.utils.safestring import SafeData, mark_safe
    76
    87class DjangoUnicodeDecodeError(UnicodeDecodeError):
    98    def __init__(self, obj, *args):
  • django/django/contrib/auth/management/commands/createsuperuser.py

     
    77import re
    88import sys
    99from optparse import make_option
    10 from django.contrib.auth.models import User, UNUSABLE_PASSWORD
     10from django.contrib.auth.models import User
    1111from django.core import validators
    1212from django.core.management.base import BaseCommand, CommandError
    1313
  • django/django/contrib/admin/options.py

     
    1 from django import oldforms, template
     1from django import template
    22from django import forms
    33from django.forms.formsets import all_valid
    44from django.forms.models import modelform_factory, inlineformset_factory
  • django/django/contrib/admin/widgets.py

     
    77from django import forms
    88from django.forms.widgets import RadioFieldRenderer
    99from django.forms.util import flatatt
    10 from django.utils.datastructures import MultiValueDict
    11 from django.utils.text import capfirst, truncate_words
     10from django.utils.text import truncate_words
    1211from django.utils.translation import ugettext as _
    1312from django.utils.safestring import mark_safe
    1413from django.utils.encoding import force_unicode
  • django/django/contrib/auth/admin.py

     
    11from django.contrib.auth.models import User, Group
    22from django.core.exceptions import PermissionDenied
    3 from django import oldforms, template
     3from django import template
    44from django.shortcuts import render_to_response
    55from django.http import HttpResponseRedirect
    66from django.utils.translation import ugettext, ugettext_lazy as _
Back to Top