Use url_for in all templates

This commit is contained in:
Gregor Sturm
2021-01-18 19:47:18 +01:00
parent 94062c2d64
commit 8c5a635de9
5 changed files with 14 additions and 11 deletions
+6 -3
View File
@@ -45,10 +45,13 @@ def recurse_dir(path):
"name": x[:-13]
if (len(x) > 13 and x[-13] in ["-", "_"])
else (x[:-4] if x.endswith(".csv") else x),
"path": os.path.join(full_path, x).replace(env.cellxgene_data, ""),
"path": os.path.join(full_path, x).replace(
env.cellxgene_data, ""
),
}
for x in sorted(os.listdir(full_path))
if x.endswith(".csv") and os.path.isfile(os.path.join(full_path, x))
if x.endswith(".csv")
and os.path.isfile(os.path.join(full_path, x))
]
return [
{
@@ -89,7 +92,7 @@ def render_entries(entries):
def get_url(entry):
return url_for("do_view", path=entry["path"])
return url_for("do_view", path=entry["path"].lstrip("/"))
def get_class(entry):