Commit 2c7add60 authored by Samuel GAIST's avatar Samuel GAIST

[search][management][commands] Implement link generation

parent 6bce966a
......@@ -73,6 +73,9 @@ class Command(BaseCommand):
logger.info("Notifying interested parties for %s" % obj.search)
objects_changed += 1
current_site = Site.objects.get_current()
leaderboard_search_link = (
f"https://{current_site.domain}" + obj.search.get_absolute_url()
)
template_path = "search/leaderboard_changed.txt"
subject = (
'Experiment ranking for leaderboard "%s" changed'
......@@ -86,7 +89,7 @@ class Command(BaseCommand):
"leaderboard": obj,
"prev_date": prev_date,
"beat_version": __version__,
"site": current_site,
"leaderboard_search_link": leaderboard_search_link,
},
),
settings.DEFAULT_FROM_EMAIL,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment