Skip to content

Commit

Permalink
Add event description and location to mail
Browse files Browse the repository at this point in the history
  • Loading branch information
gritfessel committed Oct 16, 2020
1 parent ddfb4cf commit a979ee7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 11 additions & 2 deletions ephios/event_management/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@ def new_event(event):

subject = _("New {type}: {title}").format(type=event.type, title=event.title)
text_content = _(
"A new {type} ({title}) has been added. \n You can view it here: {link}"
).format(type=event.type, title=event.title, link=event.get_absolute_url())
"A new {type} ({title}, {location}) has been added.\n"
"Further information: {description}\n"
"You can view the event here: {url}{link}"
).format(
type=event.type,
title=event.title,
location=event.location,
description=event.description,
url=SITE_URL,
link=event.get_absolute_url(),
)
html_content = render_to_string(
"event_management/mails/new_event.html", {"event": event, "site_url": SITE_URL}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
{% load i18n %}

{% block content %}
<h1>{{ event.type }} {% trans "added" %}: {{ event.title }}</h1>
<h1>{{ event.type }} {% translate "added" %}: {{ event.title }}</h1>
<div>
<a href="{{ site_url }}{% url "event_management:event_detail" event.pk %}">{% trans "View" %}</a>
{{ event.description }}
{% translate "Location" %}: {{ event.location }}
<a href="{{ site_url }}{% url "event_management:event_detail" event.pk %}">{% translate "View" %}</a>
</div>
{% for shift in event.shifts.all %}
{% include "event_management/fragments/shift_box_big.html" with shift=shift without_controls=True %}
Expand Down

0 comments on commit a979ee7

Please sign in to comment.