misc: allow reminder to be sent up to five days before date (#69350)

This commit is contained in:
Frédéric Péters 2022-09-20 14:54:41 +02:00
parent e3f38a3728
commit dac8f1d5a9
2 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,8 @@ class Migration(migrations.Migration):
(1, 'One day before'),
(2, 'Two days before'),
(3, 'Three days before'),
(4, 'Four days before'),
(5, 'Five days before'),
],
help_text=(
'In order to prevent users from getting a reminder shortly after booking, a '

View File

@ -3010,12 +3010,16 @@ class AgendaReminderSettings(models.Model):
ONE_DAY_BEFORE = 1
TWO_DAYS_BEFORE = 2
THREE_DAYS_BEFORE = 3
FOUR_DAYS_BEFORE = 4
FIVE_DAYS_BEFORE = 5
CHOICES = [
(None, _('Never')),
(ONE_DAY_BEFORE, _('One day before')),
(TWO_DAYS_BEFORE, _('Two days before')),
(THREE_DAYS_BEFORE, _('Three days before')),
(FOUR_DAYS_BEFORE, _('Four days before')),
(FIVE_DAYS_BEFORE, _('Five days before')),
]
agenda = models.OneToOneField(Agenda, on_delete=models.CASCADE, related_name='reminder_settings')