From 8b1c65c53b07a27abb7c54c66ab9a44da64d3cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <henrik@trineo.org> Date: Mon, 8 Nov 2021 17:38:21 +0100 Subject: [PATCH] ENH: make entity ids clickable --- src/caosadvancedtools/crawler.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/caosadvancedtools/crawler.py b/src/caosadvancedtools/crawler.py index 3017f64c..82ada2fa 100644 --- a/src/caosadvancedtools/crawler.py +++ b/src/caosadvancedtools/crawler.py @@ -537,9 +537,13 @@ carefully and if the changes are ok, click on the following link: info = "UPDATE: updating the following entities\n" + baseurl = db.configuration.get_config()["Connection"]["url"] for el in cfood.to_be_updated: - info += str("\t" + el.name if el.name is not None else "\t" + - str(el.id)) + def make_clickable(txt, id): + return "<a href='{}/Entity/{}'>{}</a>".format(baseurl, id, txt) + info += str("\t" + make_clickable(el.name, el.id) + if el.name is not None + else "\t" + make_clickable(str(el.id), el.id)) info += "\n" logger.info(info) -- GitLab