Verified Commit 8c95f5f1 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Add base url to notification url

parent 188bbcc7
......@@ -301,8 +301,9 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
registration_reminder.category = Category.objects.get(
key='event')
registration_reminder.time = registration_reminder_time
registration_reminder.url = reverse("events:event",
args=[self.id])
registration_reminder.url = (
f'{settings.BASE_URL}'
f'{reverse("events:event", args=[self.id])}')
registration_reminder.save()
self.registration_reminder = registration_reminder
......@@ -321,10 +322,10 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
if start_reminder_time > timezone.now():
start_reminder.title_en = 'Event'
start_reminder.title_nl = 'Evenement'
start_reminder.body_en = ('\'{}\' starts in '
'1 hour'.format(self.title_en))
start_reminder.body_nl = ('\'{}\' begint over '
'1 uur'.format(self.title_nl))
start_reminder.body_en = (f'\'{self.title_en}\' starts in '
'1 hour')
start_reminder.body_nl = (f'\'{self.title_nl}\' begint over '
'1 uur')
start_reminder.category = Category.objects.get(key='event')
start_reminder.time = start_reminder_time
start_reminder.save()
......
......@@ -142,7 +142,7 @@ def send_expiration_announcement(dry_run=False):
settings.MEMBERSHIP_PRICES['year'], 2
),
'renewal_url': '{}{}'.format(
'https://thalia.nu',
settings.BASE_URL,
reverse('registrations:renew')
)
})
......@@ -202,7 +202,7 @@ def send_email_change_confirmation_messages(change_request):
'members/email/email_change_confirm.txt',
{
'confirm_link': '{}{}'.format(
'https://thalia.nu',
settings.BASE_URL,
reverse(
'members:email-change-confirm',
args=[change_request.confirm_key]
......@@ -220,7 +220,7 @@ def send_email_change_confirmation_messages(change_request):
'members/email/email_change_verify.txt',
{
'confirm_link': '{}{}'.format(
'https://thalia.nu',
settings.BASE_URL,
reverse(
'members:email-change-verify',
args=[change_request.verify_key]
......
......@@ -24,7 +24,7 @@ def send_registration_email_confirmation(registration):
{
'name': registration.get_full_name(),
'confirm_link': '{}{}'.format(
'https://thalia.nu',
settings.BASE_URL,
reverse('registrations:confirm-email',
args=[registration.pk])
)
......
......@@ -35,6 +35,7 @@ if not DEBUG: # Django 1.10.3 security release changed behaviour
ALLOWED_HOSTS = []
SITE_ID = 1
BASE_URL = 'https://thalia.nu'
DATA_UPLOAD_MAX_NUMBER_FIELDS = 10000 # Useful for managing members
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment