def create_types(clear=True): from awesome.models import ExerciseType if clear: ExerciseType.collection.remove({}) for type_ in types: exercise = ExerciseType(**type_) exercise.save()
def exercise(slug): if slug == 'demo': return redirect(url_for('demo')) ex = ExerciseType.find_one({'slug': slug}) return render_template('stats.html')
def training(): exercises = ExerciseType.find() return render_template('training.html', exercises=exercises, currtraining='curr')