clean unused imports

This commit is contained in:
Benjamin Dauvergne 2013-11-29 10:24:47 +01:00
parent a2e2887bf2
commit a0ba27a129
5 changed files with 4 additions and 15 deletions

View File

@ -1,10 +1,8 @@
import os.path
import hmac
import thread
import datetime
import hashlib
import logging
import threading
from django.forms import (ModelForm, Form, Textarea, EmailField, CharField, ModelChoiceField)

View File

@ -2,7 +2,6 @@ import os
import datetime as dt
import random
import hashlib
import fnmatch
import re
import urlparse
from collections import defaultdict
@ -13,7 +12,6 @@ from django.db.models import (Model, ForeignKey, DateTimeField, CharField,
from django.contrib.auth.models import User, Group
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
from django.conf import settings
from django.core.urlresolvers import reverse
from picklefield.fields import PickledObjectField
from django.utils.timezone import now, utc, make_aware
@ -24,7 +22,6 @@ import timestamp
from .validators import validate_phone
from .utils import file_match_mime_types
from . import app_settings
from . import utils
DOCBOW_APP = _('docbow')
DOCBOW_APP = _('Docbow_App')

View File

@ -1,7 +1,6 @@
from django.shortcuts import redirect
from django.views.generic.edit import UpdateView, FormView
from django.views.generic.base import TemplateResponseMixin, View
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _

View File

@ -82,7 +82,7 @@ class BaseTestCase(TestCase):
def setUp(self):
from django.contrib.auth.models import User
from django.core.files.base import ContentFile
from .models import (DocbowProfile, all_emails, Document, FileType,
from .models import (DocbowProfile, Document, FileType,
AttachedFile)
import tempfile
@ -160,7 +160,7 @@ class DelegatesTestCase(BaseTestCase):
def setUp(self):
super(DelegatesTestCase, self).setUp()
from django.contrib.auth.models import User
from .models import (DocbowProfile, all_emails, Document, FileType, Delegation)
from .models import Delegation
delegate = User(username='delegate')
delegate.set_password('delegate')
delegate.save()

View File

@ -2,7 +2,6 @@ import smtplib
from itertools import count, chain
import socket
import os.path
import collections
import operator
import datetime
@ -10,7 +9,6 @@ import datetime
from django.contrib.auth.decorators import login_required
import django.contrib.auth as auth
from django.shortcuts import render, redirect, get_object_or_404
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect, Http404
@ -24,7 +22,6 @@ from django.views.generic.list import MultipleObjectMixin, ListView
from django.views.generic.base import View
from django.views.decorators.debug import sensitive_post_parameters
from django.views.decorators.cache import never_cache
from django.utils import timezone
from BeautifulSoup import BeautifulSoup
@ -33,10 +30,9 @@ import django_tables2.views as tables_views
from .forms import (FileForm, AnonymousContactForm, ContactForm,
ForwardingForm, FilterForm)
from .models import (Mailbox, username, AttachedFile, SendingLimitation,
from .models import (Mailbox, AttachedFile, SendingLimitation,
MailingList, is_guest, Document, FileType, DeletedDocument)
from .decorators import no_delegate, never_cache, as_delegate
from .logger_adapter import get_logger
from .decorators import no_delegate, as_delegate
from . import tables
from . import app_settings
from . import unicodecsv
@ -567,7 +563,6 @@ class ODSMultipleObjectMixin(CSVMultipleObjectMixin):
def get(self, request, *args, **kwargs):
from . import ods
import cStringIO as StringIO
response = HttpResponse(mimetype='application/vnd.oasis.opendocument.spreadsheet')
response['Content-Disposition'] = 'attachment; filename="%s"' % self.filename
workbook = ods.Workbook(encoding='utf-8')