Beispiel #1
0
def next():
    try:
        unsolved = Drill.get(Drill.user == g.user, Drill.solved == False)
        unsolved.solved = True
        unsolved.save()
    except peewee.DoesNotExist, e:
        pass
Beispiel #2
0
def next():
    try:
        unsolved = Drill.get(Drill.user == g.user, Drill.solved == False)
        unsolved.solved = True
        unsolved.save()
    except peewee.DoesNotExist, e:
        pass
Beispiel #3
0
def solve(id):
    print request.form
    attempt = request.form.get("solution")
    drill = Drill.get(Drill.id == id)
    drill.solution = attempt
    drill.save()

    success = drill.compare()

    return json.dumps({"result": success})
Beispiel #4
0
def solve(id):
    print request.form
    attempt = request.form.get("solution")
    drill = Drill.get(Drill.id == id)
    drill.solution = attempt
    drill.save()

    success = drill.compare()

    return json.dumps({"result": success})