diff --git a/shiftregister/app/migrations/0010_room_meeting_location.py b/shiftregister/app/migrations/0010_room_meeting_location.py new file mode 100644 index 0000000..e7a6cb9 --- /dev/null +++ b/shiftregister/app/migrations/0010_room_meeting_location.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.4 on 2022-05-17 15:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("app", "0009_helper_asta_confirmed"), + ] + + operations = [ + migrations.AddField( + model_name="room", + name="meeting_location", + field=models.TextField(default="Infopoint"), + ), + ] diff --git a/shiftregister/app/models.py b/shiftregister/app/models.py index cfb3650..99acf19 100644 --- a/shiftregister/app/models.py +++ b/shiftregister/app/models.py @@ -13,6 +13,7 @@ global_preferences = global_preferences_registry.manager() class Room(models.Model): name = models.CharField(max_length=200, primary_key=True) required_helpers = models.IntegerField() + meeting_location = models.TextField(default="Infopoint") def __str__(self): return self.name @@ -135,7 +136,8 @@ class ShiftRegistration(models.Model): ) def send_reminder(self): - text = f"Deine kontakt-Schicht beginnt um {self.shift.start_at.strftime('%H:%M')}, bitte komm eine halbe Stunde vorher an den Infopoint." + url = reverse("shift", kwargs={"shiftid": self.shift.pk}) + text = f"Deine kontakt-Schicht beginnt um {self.shift.start_at.strftime('%H:%M')}, bitte komm 15 Minuten vorher an den Treffpunkt. https://kontakt.rocks{url}" msg = Message(to=self.helper, text=text) msg.save() self.reminder_sent = True diff --git a/shiftregister/app/templates/shift.html b/shiftregister/app/templates/shift.html index d935197..fa2da7d 100644 --- a/shiftregister/app/templates/shift.html +++ b/shiftregister/app/templates/shift.html @@ -5,7 +5,7 @@ {% block content %}