Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
0ac82500
Verified
Commit
0ac82500
authored
Jun 07, 2017
by
Sébastiaan Versteeg
Browse files
Add localization and management command
parent
d32e128a
Changes
3
Hide whitespace changes
Inline
Side-by-side
website/members/emails.py
View file @
0ac82500
from
datetime
import
datetime
,
timedelta
from
datetime
import
timedelta
from
django.core
import
mail
from
django.template
import
loader
...
...
@@ -86,7 +86,7 @@ def send_expiration_announcement(dry_run=False):
'members/email/expiration_announcement.txt'
,
{
'member'
:
member
})
mail
.
EmailMessage
(
_
(
'Membership
fees debit
announcement'
),
_
(
'Membership
expiration
announcement'
),
email_body
,
settings
.
WEBSITE_FROM_ADDRESS
,
[
member
.
user
.
email
],
...
...
website/members/management/commands/sendexpirationnotification.py
0 → 100644
View file @
0ac82500
from
django.core.management.base
import
BaseCommand
from
members
import
emails
class
Command
(
BaseCommand
):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'--dry-run'
,
action
=
'store_true'
,
dest
=
'dry-run'
,
default
=
False
,
help
=
'Dry run instead of sending e-mail'
,
)
def
handle
(
self
,
*
args
,
**
options
):
emails
.
send_expiration_announcement
(
bool
(
options
[
'dry-run'
]))
website/members/templates/members/email/expiration_announcement.txt
View file @
0ac82500
{% load i18n %}{% blocktrans %}Dear {{ member.full_name }},
Het afgelopen collegejaar ben je lid
o
f
be
gunstiger geweest van Studievereniging
Thalia. Je hebt daarbij geen doorlopende machtiging afgegeven, dus je
lidmaatschap loopt op 1 s
eptember
af
.
The past year you've been a member
o
r
be
nificiary of Study Association Thalia.
You've not given us permission to prolong it automatically, thus your membership will
end on the 1st of S
eptember.
Wil je volgend jaar ook nog van de voordelen van een Thalialidmaatschap
genieten, zoals de borrels, boekverkoop, activiteiten, de tentamenbundel, de
Thabloid en een symposium, dan zul je je lidmaatschap moeten verlengen. Dit kun
je doen door in de week van 2 september (de eerste collegeweek) langs de
bestuurskamer te komen.
If you still want to enjoy all the benefits a membership gives you the coming year
then you'll have to renew it. This'll give you access to activities, the book sale,
our exam collection and a symposium. Come by the board room and we'll help you
to extend your membership.
Are you not able to come by? Then just send us an email: info@thalia.nu.
Ook op een later moment kun je je nog inschrijven, neem dan even contact op met
het bestuur om te bespreken wat een handig moment is. Mail hiervoor naar
info@thalia.nu.
Met vriendelijke groeten
,
With kind regards
,
Het bestuur
The board of Study Association Thalia
P.S.
het kan zijn dat je je lidmaatschap al verlengd hebt bij de introbbq, maar
dat dit nog niet is verwerkt: in dat geval hoef je niets
t
e
do
en
.{% endblocktrans %}
P.S.
It's possible that you've already renewed your membership and that it hasn't been processed yet.
If that's the case then you don't need
t
o
do
anything
.{% endblocktrans %}
g
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment