Skip to content
Snippets Groups Projects
Unverified Commit f33aa837 authored by Marco Ciotola's avatar Marco Ciotola
Browse files

[DJ1.9] Fix some imports for django 1.9

parent 6b71ca96
No related branches found
No related tags found
No related merge requests found
......@@ -6,28 +6,26 @@ Ben Adida
(ben@adida.net)
"""
from django.db import models, transaction
import json
from django.conf import settings
from django.core.mail import send_mail
import datetime
import io
import random
import uuid
import datetime, logging, uuid, random, io
import bleach
import copy
import csv
import unicodecsv
from django.conf import settings
from django.db import models, transaction
from crypto import electionalgs, algs, utils
from helios import utils as heliosutils
import helios.views
from crypto import algs, utils
from helios import datatypes
from helios import utils as heliosutils
from helios.datatypes.djangofield import LDObjectField
from helios_auth.jsonfield import JSONField
# useful stuff in helios_auth
from helios_auth.models import User, AUTH_SYSTEMS
from helios_auth.jsonfield import JSONField
from helios.datatypes.djangofield import LDObjectField
import csv, copy
import unicodecsv
class HeliosModel(models.Model, datatypes.LDObjectContainer):
class Meta:
......@@ -578,6 +576,7 @@ class Election(HeliosModel):
@property
def url(self):
import helios.views
return helios.views.get_election_url(self)
def init_tally(self):
......
......@@ -6,11 +6,7 @@ Ben Adida
reworked 2011-01-09
"""
from helios.crypto import algs, utils
import logging
import uuid
import datetime
from helios import models
from helios.crypto import algs
from . import WorkflowObject
class EncryptedAnswer(WorkflowObject):
......
......@@ -6,13 +6,11 @@ GAE
Ben Adida
(ben@adida.net)
"""
from django.db import models
from jsonfield import JSONField
import datetime, logging
from auth_systems import AUTH_SYSTEMS
from auth_systems import AUTH_SYSTEMS, can_check_constraint, can_list_categories
# an exception to catch when a user is no longer authenticated
class AuthenticationExpired(Exception):
......
......@@ -4,19 +4,16 @@ Generic Security -- for the auth system
Ben Adida (ben@adida.net)
"""
# nicely update the wrapper function
from functools import update_wrapper
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.core.exceptions import *
import uuid
from django.conf import settings
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseNotAllowed
from django.http import HttpResponseRedirect
# nicely update the wrapper function
from functools import update_wrapper
import oauth
import uuid
from helios_auth.models import *
from helios_auth.models import User
FIELDS_TO_SAVE = 'FIELDS_TO_SAVE'
......
......@@ -2,13 +2,10 @@
Glue some events together
"""
from django.conf import settings
from django.core.urlresolvers import reverse
from django.conf import settings
import helios.signals
import helios.views
from helios.view_utils import render_template_raw
import helios.views, helios.signals
import views
def vote_cast_send_message(user, voter, election, cast_vote, **kwargs):
## FIXME: this doesn't work for voters that are not also users
......
......@@ -2,23 +2,15 @@
server_ui specific views
"""
from helios.models import *
from helios_auth.security import *
from view_utils import *
import helios.views
import helios
from helios.crypto import utils as cryptoutils
from helios_auth.security import *
from helios.security import can_create_election
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect, Http404, HttpResponseNotAllowed
import copy
from django.conf import settings
import copy
import helios_auth.views as auth_views
from helios.models import Election
from helios.security import can_create_election
from helios_auth.security import get_user
from view_utils import render_template
def get_election():
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment