clean up imports

pull/1/head
eric 2016-04-28 12:23:19 -04:00
parent a1d2051ab7
commit dbf7b1d6b0
10 changed files with 19 additions and 18 deletions

View File

@ -1,7 +1,7 @@
from django.utils.translation import ugettext as _
from django.contrib import admin
from django.core.urlresolvers import reverse
from models import (Choice, Questionnaire, Question, QuestionSet, Subject,
from .models import (Choice, Questionnaire, Question, QuestionSet, Subject,
RunInfo, RunInfoHistory, Answer, DBStylesheet, Landing)
adminsite = admin.site

View File

@ -3,18 +3,19 @@
Functions to send email reminders to users.
"""
import random, time, smtplib, rfc822
from datetime import datetime
from email.Header import Header
from email.Utils import formataddr, parseaddr
from django.core.mail import get_connection, EmailMessage
from django.contrib.auth.decorators import login_required
from django.template import Context, loader
from django.utils import translation
from django.conf import settings
from django.http import Http404, HttpResponse
from models import Subject, QuestionSet, RunInfo, Questionnaire
from datetime import datetime
from django.shortcuts import render_to_response, get_object_or_404
import random, time, smtplib, rfc822
from email.Header import Header
from email.Utils import formataddr, parseaddr
from .models import Subject, QuestionSet, RunInfo, Questionnaire
try: from hashlib import md5
except: from md5 import md5

View File

@ -2,7 +2,7 @@
import questionnaire
from django.conf.urls.defaults import *
from views import *
from .views import *
urlpatterns = patterns('',
url(r'^q/(?P<runcode>[^/]+)/(?P<qs>\d+)/$',

View File

@ -1,6 +1,6 @@
from django.contrib import admin
from models import Page
from .models import Page
class PageAdmin(admin.ModelAdmin):
list_display = ('slug', 'title',)

View File

@ -4,7 +4,7 @@ from django.conf import settings
from django.template import RequestContext
from django import http
from django.utils import translation
from models import Page
from .models import Page
def page(request, page_to_render):
try:

View File

@ -3,9 +3,9 @@
# exist in the drop down list of the management interface.
#
from django.utils.translation import ugettext as _
from .. import add_type, question_proc, answer_proc, AnswerException
from .. import Processors, QuestionProcessors
from django.utils.translation import ugettext as _
@question_proc('custom')
def question_custom(request, question):

View File

@ -1,9 +1,9 @@
from .. import add_type, question_proc, answer_proc, AnswerException
import ast
from json import dumps
from django.conf import settings
from django.utils.translation import ugettext as _
from json import dumps
import ast
from ..utils import get_runid_from_request
from .. import add_type, question_proc, answer_proc, AnswerException
@question_proc('range', 'number')
def question_range_or_number(request, question):

View File

@ -1,8 +1,8 @@
import ast
from json import dumps
from django.utils.translation import ugettext as _
from .. import add_type, question_proc, answer_proc, AnswerException
from ..utils import get_runid_from_request
from django.utils.translation import ugettext as _
from json import dumps
import ast
#true if either 'required' or if 'requiredif' is satisfied

View File

@ -1,5 +1,5 @@
from .. import add_type, question_proc, answer_proc, AnswerException
from django.utils.translation import ugettext as _, ugettext_lazy
from .. import add_type, question_proc, answer_proc, AnswerException
perioddict = {
"second" : ugettext_lazy("second(s)"),

View File

@ -1,6 +1,6 @@
from django.test import TestCase
from dependency_checker import check_actual_answers_against_expression, explode_answer_into_list
from .dependency_checker import check_actual_answers_against_expression, explode_answer_into_list
from .models import Question