from django import forms
-from django.contrib.auth.forms import AuthenticationForm, PasswordResetForm
+from django.contrib.auth.forms import AuthenticationForm
import re
#
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
#
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
from django.db import models
-from django.contrib.auth.models import User
from pgweb.core.models import Version
class DocPage(models.Model):
from pgweb.core.models import Organisation
-from datetime import datetime
-
class Category(models.Model):
catname = models.CharField(max_length=100, null=False, blank=False)
-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
-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
#
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
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
#
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
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
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.
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):
-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