Commit 2abbcb94 authored by Luko van der Maas's avatar Luko van der Maas Committed by Sébastiaan Versteeg
Browse files

Merge branch 'feature/events-notification-default-url' into 'master'

Give event notification default url of event

See merge request !1275

(cherry picked from commit 7a202095)

4220570b Give event notification default url of event
parent a6d28c9b
import csv
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import helpers
from django.contrib.admin.views.decorators import staff_member_required
......@@ -151,12 +152,14 @@ class EventMessage(FormView):
def form_valid(self, form):
values = form.cleaned_data
if not values['url']:
values['url'] = settings.BASE_URL + self.event.get_absolute_url()
message = Message(
url=values['url'] if values['url'] else None,
......@@ -94,4 +94,8 @@ class EventMessageForm(forms.Form):
title_nl = forms.CharField(label=_('Title (NL)'), max_length=150)
body_en = forms.CharField(label=_('Body (EN)'), widget=forms.Textarea)
body_nl = forms.CharField(label=_('Body (NL)'), widget=forms.Textarea)
url = forms.CharField(max_length=256, required=False)
url = forms.CharField(
help_text=_('The notification opens to the event by default.')
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-27 21:30+0200\n"
"PO-Revision-Date: 2019-05-27 21:31+0200\n"
"POT-Creation-Date: 2019-05-28 13:31+0200\n"
"PO-Revision-Date: 2019-05-28 13:31+0200\n"
"Last-Translator: Thom Wiggers <>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -154,6 +154,10 @@ msgstr "Bericht (EN)"
msgid "Body (NL)"
msgstr "Bericht (NL)"
msgid "The notification opens to the event by default."
msgstr "De notificatie opent standaard het evenement."
msgid "Drinks"
msgstr "Borrel"
Supports Markdown
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