def list(): if 'time' in request.args and request.args['time'].isdigit(): duration = int(request.args['time']) else: duration = 120 if 'humor' in request.args and request.args['time'].isdigit(): mood = int(request.args['humor']) else: mood = 2 logging.debug({"duration": duration, "mood": mood}) amenities = ws.get_amenities(mood=mood) counters = ws.counters(amenities) return render_template('list.html', counters=counters)
def fdr(type): amenities = ws.get_amenities(anemity_types=[type]) amenities = ws.filter(amenities) return render_template('fdr.html', amenities=amenities)