Remove unused imports
authorMagnus Hagander <magnus@hagander.net>
Fri, 29 Jun 2018 11:38:47 +0000 (13:38 +0200)
committerMagnus Hagander <magnus@hagander.net>
Fri, 29 Jun 2018 11:40:04 +0000 (13:40 +0200)
14 files changed:
pgweb/account/forms.py
pgweb/core/management/commands/fetch_rss_feeds.py
pgweb/core/management/commands/moderation_report.py
pgweb/docs/models.py
pgweb/downloads/models.py
pgweb/downloads/views.py
pgweb/lists/views.py
pgweb/news/management/commands/twitter_post.py
pgweb/security/admin.py
pgweb/security/management/commands/update_cve_links.py
pgweb/survey/views.py
pgweb/util/auth.py
pgweb/util/decorators.py
pgweb/util/middleware.py

index 406e313c0b9085a0c710449dbbc6d1d7c15977fa..75c904eea9b51f605eca2a75cdd749e4f5fefe09 100644 (file)
@@ -1,5 +1,5 @@
 from django import forms
-from django.contrib.auth.forms import AuthenticationForm, PasswordResetForm
+from django.contrib.auth.forms import AuthenticationForm
 
 import re
 
index 36ccd425721d7864585712b22c90a81836c38395..20f31704f4cbf6bb841076541208af4c53d31d13 100644 (file)
@@ -5,8 +5,7 @@
 #
 
 from django.core.management.base import BaseCommand
-from django.db import connection, transaction
-from django.conf import settings
+from django.db import transaction
 
 import socket
 import feedparser
index 2e44f0f76ba6afa80fd824d0d5e8d33fea4c96ca..de45337092f899a0d393db8c15191e2a91cd6209 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 from django.core.management.base import BaseCommand
-from django.db import connection, transaction
+from django.db import transaction
 from django.conf import settings
 
 from datetime import datetime
index d5aa1859d32dd1564db4e935dacc4952adbd88ed..a2754b60ce97897fb0f0d2fb84a3f60cad56ddc8 100644 (file)
@@ -1,5 +1,4 @@
 from django.db import models
-from django.contrib.auth.models import User
 from pgweb.core.models import Version
 
 class DocPage(models.Model):
index e88f7a632941abec9f448c76cf5225c7e0102b62..61849e77aeb0cdd7b86415ca3006e2cc8c630068 100644 (file)
@@ -2,8 +2,6 @@ from django.db import models
 
 from pgweb.core.models import Organisation
 
-from datetime import datetime
-
 
 class Category(models.Model):
        catname = models.CharField(max_length=100, null=False, blank=False)
index 26bdc793cf8aa604c8a6a104fa69bdef176c39b2..051afc82423b94ee71c00cef4fd1adde388309ce 100644 (file)
@@ -1,20 +1,17 @@
-from django.core.urlresolvers import reverse
 from django.shortcuts import render, get_object_or_404
 from django.http import HttpResponse, Http404, HttpResponseRedirect
 from pgweb.util.decorators import login_required
 from django.views.decorators.csrf import csrf_exempt
-from django.db import transaction
 from django.conf import settings
 
 import os
-import urlparse
 import cPickle as pickle
 import json
 
 from pgweb.util.decorators import nocache
 from pgweb.util.contexts import render_pgweb
 from pgweb.util.helpers import simple_form, PgXmlHelper, HttpServerError
-from pgweb.util.misc import get_client_ip, varnish_purge, version_sort
+from pgweb.util.misc import varnish_purge, version_sort
 
 from pgweb.core.models import Version
 from models import Category, Product, StackBuilderApp
index 4a951885b00462c32b373a1a391aa8daf49aa3c2..46ce8dc4e6ae48b7469dec59948c9e7cf6c2e585 100644 (file)
@@ -1,7 +1,4 @@
-from django.shortcuts import get_object_or_404
-from django.http import HttpResponse, HttpResponseForbidden
-from django.views.decorators.csrf import csrf_exempt
-from django.conf import settings
+from django.http import HttpResponse
 
 import json
 
index d6d35d617662c4693a4c60da5e85cd609ce3b0ab..73e5b2c5e5e70b26cda543c09f74dcdfb9d8e8b6 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 from django.core.management.base import BaseCommand, CommandError
-from django.db import connection, transaction
+from django.db import connection
 from django.conf import settings
 
 from datetime import datetime, timedelta
index 1996d4d9d7fdd9e0bee9287dae22da1d35d56114..9863a764c044bed022fa18497e97c1d017453017 100644 (file)
@@ -1,7 +1,5 @@
 from django.contrib import admin
 from django import forms
-from django.db import models
-from django.core.validators import ValidationError
 from django.conf import settings
 
 from pgweb.core.models import Version
index 799dd72c9823c607526ea8d597d87ee7d8e4cff4..159b124edac1ce2b3fccf4daabe3ae196399fbf2 100644 (file)
@@ -4,7 +4,7 @@
 #
 
 from django.core.management.base import BaseCommand
-from django.db import connection, transaction
+from django.db import transaction
 from django.conf import settings
 
 from pgweb.security.models import SecurityPatch
index d4ca26fd9dbc2d9130443f45003dbe0a4bfc4eed..09dd07383d33762a3ff6b4f1997a8d0970087a2c 100644 (file)
@@ -1,6 +1,6 @@
 from django.shortcuts import get_object_or_404
 from django.http import HttpResponseRedirect
-from django.db import connection, transaction
+from django.db import connection
 from django.template.defaultfilters import slugify
 from django.views.decorators.csrf import csrf_exempt
 
index d476f0ee5876fc2685410d95b626fc07ea3d0eee..bb977ddcdd782b1a92debe6b1875361c9d02bab5 100644 (file)
@@ -1,8 +1,5 @@
 from django.contrib.auth.models import User
 from django.contrib.auth.backends import ModelBackend
-from django.db import connection
-
-from pgweb.core.models import UserProfile
 
 # Special version of the authentication backend, so we can handle things like
 # forced lowercasing of usernames.
index e7910312ce3775ca84cfb90d2c1b491965f0979a..3ea4109c0b9c567cc2265bf12874b099cf8121a2 100644 (file)
@@ -20,8 +20,6 @@ def cache(days=0, hours=0, minutes=0, seconds=0):
                return __cache
        return _cache
 
-from django.utils.decorators import available_attrs
-
 # A wrapped version of login_required that throws an exception if it's
 # used on a path that's not under /account/.
 def login_required(f):
index 5250496813699a14b5c1600f708073bf3e8aa123..d1feb3703518ffb2955d6813236e283a10275ea7 100644 (file)
@@ -1,10 +1,7 @@
-from django.http import HttpResponseRedirect, HttpResponse
-from django.conf import settings
-
 # Use thread local storage to pass the username down.
 # http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
 try:
-    from threading import local, currentThread
+    from threading import local
 except ImportError:
     from django.utils._threading_local import local