mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-01 15:54:53 +00:00
Remove unused imports
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user