def normal_view(): lists = {"public": [], "submitted": [], "private": []} for cl in ControlLists.get_available(current_user): lists[cl.str_public].append(cl) return render_template_with_nav_info('main/corpus_new.html', lemmatizers=lemmatizers, public_control_lists=lists, tsv=request.form.get("tsv", ""))
def _get_available(): """Prepare dictionary of available control lists. :returns: available control lists :rtype: dict """ lists = {"public": [], "submitted": [], "private": []} for cl in ControlLists.get_available(current_user): lists[cl.str_public].append(cl) return lists