Exemplo n.º 1
0
def create_types(clear=True):
    from awesome.models import ExerciseType

    if clear:
        ExerciseType.collection.remove({})

    for type_ in types:
        exercise = ExerciseType(**type_)
        exercise.save()
Exemplo n.º 2
0
def exercise(slug):
    if slug == 'demo':
        return redirect(url_for('demo'))
    ex = ExerciseType.find_one({'slug': slug})
    return render_template('stats.html')
Exemplo n.º 3
0
def training():
    exercises = ExerciseType.find()
    return render_template('training.html', exercises=exercises, currtraining='curr')