Fixing pep8 recommendations
This commit is contained in:
parent
e4b18d98c2
commit
423101e829
4 changed files with 23 additions and 21 deletions
|
|
@ -3,16 +3,18 @@ from dajaxice.decorators import dajaxice_register
|
|||
|
||||
from three_d_viewer.models import Question
|
||||
|
||||
|
||||
@dajaxice_register
|
||||
def dajaxice_example(request):
|
||||
test = check_answer(request, 3, 1)
|
||||
print test
|
||||
return simplejson.dumps({'message':'Hello from Python!'})
|
||||
return simplejson.dumps({'message': 'Hello from Python!'})
|
||||
|
||||
@dajaxice_register
|
||||
|
||||
@dajaxice_register
|
||||
def check_answer(request, answerid, questionid):
|
||||
question = Question.objects.get(id=int(questionid))
|
||||
|
||||
|
||||
result = False
|
||||
for answer in question.correct_answers():
|
||||
print type(answer.id)
|
||||
|
|
@ -20,4 +22,3 @@ def check_answer(request, answerid, questionid):
|
|||
result = True
|
||||
print simplejson.dumps({'result': result})
|
||||
return simplejson.dumps({'result': result})
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue