From d7f79933836194a5291fdca42f32dcf34b0c9f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C5=BEe=20Pe=C4=8Dar?= Date: Sun, 6 Oct 2024 00:37:26 +0100 Subject: [PATCH] Improve msg --- stats/management/commands/dailyaccountstats.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stats/management/commands/dailyaccountstats.py b/stats/management/commands/dailyaccountstats.py index ee4362b..2ac52f9 100644 --- a/stats/management/commands/dailyaccountstats.py +++ b/stats/management/commands/dailyaccountstats.py @@ -4,6 +4,7 @@ from django.contrib.auth.models import User from django.core.mail import send_mail +from django.urls import reverse from django.utils import timezone from django_rich.management import RichCommand @@ -186,13 +187,13 @@ def send_email_report(self): ending_conferences = Conference.objects.filter(end_date=todays_date.date()) todays_conferences_msg = "\n".join( [ - f"{conference.name} {conference.website}, with num posts: {conference.posts.count()} starting today!" + f"{conference.name} https://fedidevs.com{reverse("conference", kwargs={"conference_slug":conference.slug})}, with {conference.posts.count()} posts is starting today!" for conference in todays_conferences ] ) ending_conferences_msg = "\n".join( [ - f"{conference.name} {conference.website}, with num posts: {conference.posts.count()} ending today!" + f"{conference.name} https://fedidevs.com{reverse("conference", kwargs={"conference_slug":conference.slug})}, with {conference.posts.count()} posts is ending today!" for conference in ending_conferences ] )