Better Link support

This commit is contained in:
Thomas Sileo
2018-07-15 21:12:57 +02:00
parent 364c1d9273
commit e3284416d2
4 changed files with 15 additions and 12 deletions

4
app.py
View File

@@ -269,8 +269,10 @@ def domain(url):
def get_url(u):
if isinstance(u, dict):
return u["href"]
else:
elif isinstance(u, str):
return u
else:
raise ValueError(f"unexpected URL field type: {type(u)}: {u!r}")
@app.template_filter()