Esempio 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()
Esempio 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')
Esempio n. 3
0
def training():
    exercises = ExerciseType.find()
    return render_template('training.html', exercises=exercises, currtraining='curr')