From 336298fb295516af359550ad6898969298aa863d Mon Sep 17 00:00:00 2001 From: Oren Lederman Date: Sun, 19 Jun 2016 18:10:08 -0400 Subject: [PATCH] Fixing small issues with the weekly email --- src/openbadge/analysis.py | 2 +- src/openbadge/management/commands/send_weekly_email.py | 1 + src/openbadge/templates/openbadge/report_template.html | 2 +- templates/email/weekly_report_email.html | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/openbadge/analysis.py b/src/openbadge/analysis.py index 25c5c62..cc4f90e 100644 --- a/src/openbadge/analysis.py +++ b/src/openbadge/analysis.py @@ -89,7 +89,7 @@ def send_weekly_email(group, week_num): #return #url = "http://127.0.0.1:8000/weekly_group_report/"+group.key+"/"+week_num - url = "http://" + settings.SITE_ID + "/"+group.key+"/"+week_num + url = "http://" + settings.SITE_ID + "/weekly_group_report/"+group.key+"/"+week_num #settings.SITE_ID returns cynthia.media.mit.edu on my laptop #hopefully, settings.SITE_ID on production server is openbadgeprod.media.mit.edu ... diff --git a/src/openbadge/management/commands/send_weekly_email.py b/src/openbadge/management/commands/send_weekly_email.py index 0377743..22c09c8 100644 --- a/src/openbadge/management/commands/send_weekly_email.py +++ b/src/openbadge/management/commands/send_weekly_email.py @@ -20,6 +20,7 @@ def handle(self, *args, **options): groups = StudyGroup.objects.all() for group in groups: + self.stdout.write("Sending emails to group {0}".format(group.key)) send_weekly_email(group, week_num) self.stdout.write("Sent the emails successfully!") diff --git a/src/openbadge/templates/openbadge/report_template.html b/src/openbadge/templates/openbadge/report_template.html index cfa7b4e..ae44848 100644 --- a/src/openbadge/templates/openbadge/report_template.html +++ b/src/openbadge/templates/openbadge/report_template.html @@ -4,7 +4,7 @@ {% if exist %} - Meeting Summary for Study Group {{name}} - Week {{week_num}} + Meeting Summary for Study Group {{name}} - Week {{week_num + 2}} {% else %} No Meeting Summary Available {% endif %} diff --git a/templates/email/weekly_report_email.html b/templates/email/weekly_report_email.html index d936cd1..84d6e18 100644 --- a/templates/email/weekly_report_email.html +++ b/templates/email/weekly_report_email.html @@ -1,5 +1,5 @@
-
Roundtable Weekly Summary for {{ group.name }} for Week {{ week_num }}
+
Roundtable Weekly Summary for {{ group.name }} for Week {{ week_num + 2 }}
It is already the beginning of Week 4 and we are excited by the