Commit 9cc2ef53 authored by Luuk Scholten's avatar Luuk Scholten
Browse files

Merge branch 'feature/103-5-information-mail' into 'master'

Administratietrucjes: information check email

See merge request !507
parents 9367c917 4f502b40
......@@ -37,3 +37,35 @@ def send_membership_announcement(dry_run=False):
{'members': members}),
def send_information_request(dry_run=False):
members = models.Member.active_members.all()
with mail.get_connection() as connection:
for member in members:
print("Send email to {} ({})".format(member.get_full_name(),
if not dry_run:
with translation.override(member.language):
email_body = loader.render_to_string(
{'name': member.get_full_name(),
'member': member})
_('Membership information check'),
if not dry_run:
_('Membership information check sent'),
{'members': members}),
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-14 21:21+0200\n"
"PO-Revision-Date: 2017-06-14 21:22+0200\n"
"POT-Creation-Date: 2017-06-15 12:20+0200\n"
"PO-Revision-Date: 2017-06-15 12:20+0200\n"
"Last-Translator: Sébastiaan Versteeg <>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -38,39 +38,39 @@ msgstr "< 18"
msgid "Unknown"
msgstr "Onbekend"
msgid "First name"
msgstr "Voornaam"
msgid "Last name"
msgstr "Achternaam"
msgid "Address"
msgstr "Adres"
msgid "Address line 2"
msgstr "Tweede adresregel"
msgid "Postal code"
msgstr "Postcode"
msgid "City"
msgstr "Woonplaats"
msgid "Download address label for selected users"
msgstr "Download adreslabels voor geselecteerde gebruikers"
msgid "Student number"
msgstr "Studentnummer"
msgid "Download student number label for selected users"
msgstr "Download studentnummers voor geselecteerde gebruikers"
......@@ -82,6 +82,14 @@ msgstr "Mededeling over lidmaatschap"
msgid "Membership announcement sent"
msgstr "Mededeling over lidmaatschap verzonden"
msgid "Membership information check"
msgstr "Controle gegevens lidmaatschap"
msgid "Membership information check sent"
msgstr "Controle gegevens lidmaatschap verzonden"
msgid "Send welcome email"
msgstr "Stuur welkomste-mails"
......@@ -352,6 +360,10 @@ msgstr "Lid tot"
msgid "The date the member stops holding this membership."
msgstr "De datum waarop het lid dit lidmaatschap beëindigd."
#: templates/admin/members/change_list.html:6
msgid "Export IBANs for Direct Debit"
msgstr ""
#: templates/members/account.html:6 templates/members/account.html:7
#: templates/members/edit_profile.html:5 templates/members/edit_profile.html:6
#: templates/members/index.html:7 templates/members/index.html:8
......@@ -434,6 +446,72 @@ msgstr ""
msgid "save"
msgstr "opslaan"
#: templates/members/email/information_check.txt:1
#, python-format
msgid ""
"Dear %(name)s,\n"
"We currently have the following information about you in our database.\n"
"Via this email we'd like to ask you to check the accuracy of this data.\n"
"Username: %(member.user.username)s\n"
"Name: %(member.get_full_name)s\n"
"Address: %(member.address_street)s\n"
" %(member.address_street2)s\n"
" %(member.address_postal_code)s\n"
" %(member.address_city)s\n"
"Phone: %(member.phone_number)s\n"
"Date of birth: %(member.birthday)s\n"
"Email address: %(\n"
"Student number: %(member.student_number)s\n"
"Cohort: %(member.starting_year)s\n"
"Programme: %(member.programme)s\n"
"You can change this data by logging into the website and using the 'edit "
"profile' page.\n"
"Unable to edit the incorrect information? Then send an email: info@thalia."
"With kind regards,\n"
"The board of Study Association Thalia\n"
"This email was automatically generated."
msgstr ""
"Beste %(name)s,\n"
"Hieronder vind je de (meeste) gegevens die we op dit moment van je "
"hebben. Wil je deze controleren op juistheid?\n"
"Gebruikersnaam: %(member.user.username)s\n"
"Naam: %(member.get_full_name)s\n"
"Adres: %(member.address_street)s\n"
" %(member.address_street2)s\n"
" %(member.address_postal_code)s\n"
" %(member.address_city)s\n"
"Telefoonnummer: %(member.phone_number)s\n"
"Geboortedatum: %(member.birthday)s\n"
"Emailadres: %(\n"
"Studentnummer: %(member.student_number)s\n"
"Cohort: %(member.starting_year)s\n"
"Programma: %(member.programme)s\n"
"Je kunt als je ingelogd bent via ‘Mijn gegevens’ de meeste van deze "
"aanpassen. Klopt iets niet wat je niet zelf kunt bewerken? Stuur dan een "
"Met vriendelijke groet,\n"
"Het bestuur der Studievereniging Thalia\n"
"Deze e-mail is automatisch gegenereerd."
#: templates/members/email/membership_announcement.txt:1
#, python-format
msgid ""
......@@ -575,6 +653,6 @@ msgstr "Statistieken"
msgid "Total amount of Thalia members"
msgstr "Totaal aantal Thalialeden"
msgid "Former member"
msgstr "Oud-lid"
from import BaseCommand
from members import emails
class Command(BaseCommand):
def add_arguments(self, parser):
help='Dry run instead of sending e-mail',
def handle(self, *args, **options):
{% load i18n %}{% blocktrans %}Dear {{ name }},
We currently have the following information about you in our database.
Via this email we'd like to ask you to check the accuracy of this data.
Username: {{ member.user.username }}
Name: {{ member.get_full_name }}
Address: {{ member.address_street }}
{{ member.address_street2 }}
{{ member.address_postal_code }}
{{ member.address_city }}
Phone: {{ member.phone_number }}
Date of birth: {{ member.birthday }}
Email address: {{ }}
Student number: {{ member.student_number }}
Cohort: {{ member.starting_year }}
Programme: {{ member.programme }}
You can change this data by logging into the website and using the 'edit profile' page.
Unable to edit the incorrect information? Then send an email:
With kind regards,
The board of Study Association Thalia
This email was automatically generated.{% endblocktrans %}
Dear board,
It's that time of the year again! The website sent an automatic email to all members.
That email asks them to check their information we currently have in our database.
This means that you can expect an influx of emails from members.
The email was sent to:
{% for member in members %}
* {{ member.full_name }}
{% endfor %}
The website
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