Log to registration pages when reminders are sent
authorMagnus Hagander <[email protected]>
Tue, 4 Mar 2025 14:54:42 +0000 (15:54 +0100)
committerMagnus Hagander <[email protected]>
Mon, 10 Mar 2025 00:21:28 +0000 (01:21 +0100)
When we send "you haven't paid yet" reminders, log it to the
registration page so we can see when someone was last reminded.

postgresqleu/confreg/management/commands/confreg_send_reminders.py

index ea4bd94cc4885089a7a422fd2d0f822be4095c25..938f1f7a6463ae8618400f5392ed169e0582237e 100644 (file)
@@ -15,7 +15,7 @@ from datetime import timedelta, time
 
 from postgresqleu.confreg.models import Conference, Speaker, ConferenceSession
 from postgresqleu.confreg.models import ConferenceRegistration
-from postgresqleu.confreg.util import send_conference_mail, send_conference_notification
+from postgresqleu.confreg.util import send_conference_mail, send_conference_notification, reglog
 
 
 class Command(BaseCommand):
@@ -170,6 +170,7 @@ class Command(BaseCommand):
                 )
                 reg.lastmodified = timezone.now()
                 reg.save()
+                reglog(reg, "Sent reminder about unconfirmed registration.")
 
                 whatstr.write("Reminded attendee {0} that their registration is not confirmed\n".format(reg.fullname))
 
@@ -212,10 +213,11 @@ class Command(BaseCommand):
 
             whatstr.write("\n\n")
 
-            # Separately mark each part of the multireg as touched
+            # Separately mark each part of the multireg as touched, and log to each reg.
             for reg in regs:
                 reg.lastmodified = timezone.now()
                 reg.save()
+                reglog(reg, "Sent reminder about unconfirmed multi-registration.")
 
     def remind_empty_submissions(self, whatstr, conference):
         # Get all sessions with empty abstract (they forgot to hit save), if they have not been touched in