def cohort(cohort=''): """ View single cohort page """ error = get_errors(request.args) if not cohort: return redirect(url_for('all_cohorts')) else: return render_template('cohort.html', c_str=cohort, m_list=mm.get_metric_names(), error=error)
def api_root(): """ View for root url - API instructions """ #@@@ TODO make tag list generation a dedicated method conn = dl.Connector(instance='slave') conn._cur_.execute('select utm_name from usertags_meta') data = [r[0] for r in conn._cur_] del conn return render_template('index.html', cohort_data=data, m_list=mm.get_metric_names())