From 1f31d3b56f748acae76d7486e0b1129a6956aa31 Mon Sep 17 00:00:00 2001 From: Skia Date: Wed, 31 Aug 2016 18:40:17 +0200 Subject: [PATCH] Send a mail when someone is subscribed --- core/templates/core/new_user_email.jinja | 17 ++ .../core/new_user_email_subject.jinja | 3 + locale/fr/LC_MESSAGES/django.mo | Bin 32161 -> 33117 bytes locale/fr/LC_MESSAGES/django.po | 230 ++++++++++-------- subscription/models.py | 7 +- subscription/views.py | 2 + 6 files changed, 162 insertions(+), 97 deletions(-) create mode 100644 core/templates/core/new_user_email.jinja create mode 100644 core/templates/core/new_user_email_subject.jinja diff --git a/core/templates/core/new_user_email.jinja b/core/templates/core/new_user_email.jinja new file mode 100644 index 00000000..e23c6b16 --- /dev/null +++ b/core/templates/core/new_user_email.jinja @@ -0,0 +1,17 @@ +{% autoescape off %} +{% trans %}You're receiving this email because you subscribed to the UTBM student association.{% endtrans %} + +{% trans %}Please go to the following page and choose a new password:{% endtrans %} +{% block reset_link %} +{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }} +{% endblock %} +{% trans %}Your username, in case it was not given to you: {% endtrans %} {{ user.get_username() }} +{% trans %}You also got a new account that will be useful to purchase products in the living areas and on the Eboutic.{% endtrans %} +{% trans account=user.customer.account_id %}Here is your account number: {{ account }}{% endtrans %} + +{% trans %}Thanks for subscribing! {% endtrans %} + +{% trans %}The AE team{% endtrans %} + +{% endautoescape %} + diff --git a/core/templates/core/new_user_email_subject.jinja b/core/templates/core/new_user_email_subject.jinja new file mode 100644 index 00000000..103149c4 --- /dev/null +++ b/core/templates/core/new_user_email_subject.jinja @@ -0,0 +1,3 @@ +{% autoescape off %} +{% trans %}New subscription to the UTBM student association{% endtrans %} +{% endautoescape %} diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index 108ac0d6bb080b207eb3f0b548d3f5e17ccf6393..37c96d892eb8f8eded4e6715431b890bf5bff3ad 100644 GIT binary patch delta 12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"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-08-31 02:41+0200\n" +"POT-Creation-Date: 2016-08-31 18:24+0200\n" "PO-Revision-Date: 2016-07-18\n" "Last-Translator: Skia \n" "Language-Team: AE info \n" @@ -134,7 +134,7 @@ msgid "comment" msgstr "commentaire" #: accounting/models.py:181 counter/models.py:204 counter/models.py:247 -#: subscription/models.py:52 +#: subscription/models.py:53 msgid "payment method" msgstr "méthode de paiement" @@ -162,16 +162,17 @@ msgstr "type comptable" msgid "target type" msgstr "type de cible" -#: accounting/models.py:190 +#: accounting/models.py:190 club/templates/club/club_detail.jinja:21 +#: club/templates/club/club_members.jinja:8 #: launderette/templates/launderette/launderette_admin.jinja:44 msgid "User" msgstr "Utilisateur" -#: accounting/models.py:190 club/templates/club/club_detail.jinja:4 +#: accounting/models.py:190 club/templates/club/club_detail.jinja:5 msgid "Club" msgstr "Club" -#: accounting/models.py:190 core/templates/core/user_base.jinja:18 +#: accounting/models.py:190 core/templates/core/user_base.jinja:49 msgid "Account" msgstr "Compte" @@ -179,7 +180,7 @@ msgstr "Compte" msgid "Company" msgstr "Entreprise" -#: accounting/models.py:190 sith/settings.py:287 sith/settings_sample.py:272 +#: accounting/models.py:190 sith/settings.py:283 sith/settings_sample.py:272 msgid "Other" msgstr "Autre" @@ -303,7 +304,7 @@ msgid "Delete" msgstr "Supprimer" #: accounting/templates/accounting/bank_account_details.jinja:17 -#: core/templates/core/user_base.jinja:7 +#: core/templates/core/user_base.jinja:12 msgid "Infos" msgstr "Infos" @@ -323,8 +324,8 @@ msgstr "Nouveau compte club" #: accounting/templates/accounting/bank_account_list.jinja:21 #: accounting/templates/accounting/club_account_details.jinja:53 #: accounting/templates/accounting/journal_details.jinja:66 -#: club/templates/club/club_detail.jinja:7 core/templates/core/file.jinja:38 -#: core/templates/core/page.jinja:31 core/templates/core/user_base.jinja:10 +#: club/templates/club/club_detail.jinja:8 core/templates/core/file.jinja:38 +#: core/templates/core/page.jinja:31 core/templates/core/user_base.jinja:31 #: core/templates/core/user_tools.jinja:33 #: counter/templates/counter/counter_list.jinja:20 #: launderette/templates/launderette/launderette_list.jinja:14 @@ -468,7 +469,7 @@ msgid "Done" msgstr "Effectué" #: accounting/templates/accounting/journal_details.jinja:34 -#: counter/views.py:560 +#: counter/views.py:561 msgid "Comment" msgstr "Commentaire" @@ -565,20 +566,25 @@ msgstr "L'utilisateur est déjà membre de ce club" msgid "past member" msgstr "Anciens membres" -#: club/templates/club/club_detail.jinja:5 +#: club/templates/club/club_detail.jinja:6 #: core/templates/core/group_edit.jinja:4 msgid "Back to list" msgstr "Retour à la liste" -#: club/templates/club/club_detail.jinja:10 core/templates/core/file.jinja:41 +#: club/templates/club/club_detail.jinja:11 core/templates/core/file.jinja:41 #: core/templates/core/page.jinja:34 msgid "Prop" msgstr "Propriétés" -#: club/templates/club/club_detail.jinja:14 +#: club/templates/club/club_detail.jinja:15 msgid "Members" msgstr "Membres" +#: club/templates/club/club_detail.jinja:22 +#: club/templates/club/club_members.jinja:9 +msgid "Role" +msgstr "Rôle" + #: club/templates/club/club_edit.jinja:4 msgid "Edit club" msgstr "Éditer le club" @@ -600,11 +606,11 @@ msgstr "Nouveau club" msgid "There is no club in this website." msgstr "Il n'y a pas de club dans ce site web." -#: club/templates/club/club_members.jinja:4 +#: club/templates/club/club_members.jinja:5 msgid "Club members" msgstr "Membres du club" -#: club/templates/club/club_members.jinja:13 +#: club/templates/club/club_members.jinja:23 #: core/templates/core/file_detail.jinja:19 launderette/views.py:146 msgid "Add" msgstr "Ajouter" @@ -1043,7 +1049,7 @@ msgstr "Connexion" msgid "Register" msgstr "S'enregister" -#: core/templates/core/base.jinja:25 +#: core/templates/core/base.jinja:25 core/templates/core/user_base.jinja:18 msgid "Tools" msgstr "Outils" @@ -1240,6 +1246,48 @@ msgstr "Né le : " msgid "Promo: " msgstr "Promo : " +#: core/templates/core/new_user_email.jinja:2 +msgid "" +"You're receiving this email because you subscribed to the UTBM student " +"association." +msgstr "" +"Vous avez reçu cet email parce que vous avez cotisé à l'Association des Étudiants de l'UTBM." + +#: core/templates/core/new_user_email.jinja:4 +#: core/templates/core/password_reset_email.jinja:4 +msgid "Please go to the following page and choose a new password:" +msgstr "" +"Merci de vous rendre sur la page suivante et de choisir un nouveau mot de " +"passe :" + +#: core/templates/core/new_user_email.jinja:8 +msgid "Your username, in case it was not given to you: " +msgstr "Votre nom d'utilisateur, si il ne vous a pas été donné :" + +#: core/templates/core/new_user_email.jinja:9 +msgid "" +"You also got a new account that will be useful to purchase products in the " +"living areas and on the Eboutic." +msgstr "" +"Un compte vous a également été créé, qui vous servira notamment à consommer dans les lieux de vie " +"ou sur l'Eboutic." + +#: core/templates/core/new_user_email.jinja:10 +msgid "Here is your account number: %(account)s" +msgstr "Voici votre numéro de compte AE : %(account)s" + +#: core/templates/core/new_user_email.jinja:12 +msgid "Thanks for subscribing! " +msgstr "Merci d'avoir cotisé !" + +#: core/templates/core/new_user_email.jinja:14 +msgid "The AE team" +msgstr "L'équipe AE" + +#: core/templates/core/new_user_email_subject.jinja:2 +msgid "New subscription to the UTBM student association" +msgstr "Nouvelle cotisation à l'Association des Étudiants de l'UTBM" + #: core/templates/core/page.jinja:7 core/templates/core/page_list.jinja:4 #: core/templates/core/page_list.jinja:9 msgid "Page list" @@ -1352,12 +1400,6 @@ msgstr "" "Vous avez reçu cet email parce que vous avez demandé une réinitialisation du " "mot de passe pour votre compte sur le site %(site_name)s." -#: core/templates/core/password_reset_email.jinja:4 -msgid "Please go to the following page and choose a new password:" -msgstr "" -"Merci de vous rendre sur la page suivante et de choisir un nouveau mot de " -"passe :" - #: core/templates/core/password_reset_email.jinja:8 msgid "Your username, in case you've forgotten: " msgstr "Votre nom d'utilisateur, en cas d'oubli :" @@ -1460,11 +1502,11 @@ msgstr "Articles" msgid "User has no account" msgstr "L'utilisateur n'a pas de compte" -#: core/templates/core/user_base.jinja:8 +#: core/templates/core/user_base.jinja:24 msgid "Stats" msgstr "Stats" -#: core/templates/core/user_base.jinja:13 +#: core/templates/core/user_base.jinja:39 #: core/templates/core/user_tools.jinja:14 msgid "Groups" msgstr "Groupes" @@ -1483,11 +1525,16 @@ msgstr "Filière : " msgid "Subscribed until %(subscription_end)s" msgstr "Cotisant jusqu'au %(subscription_end)s" -#: core/templates/core/user_detail.jinja:50 +#: core/templates/core/user_detail.jinja:49 +#: core/templates/core/user_edit.jinja:39 +msgid "Account number: " +msgstr "Numero de compte : " + +#: core/templates/core/user_detail.jinja:51 msgid "Not subscribed" msgstr "Non cotisant" -#: core/templates/core/user_detail.jinja:52 +#: core/templates/core/user_detail.jinja:53 #: subscription/templates/subscription/subscription.jinja:4 #: subscription/templates/subscription/subscription.jinja:8 msgid "New subscription" @@ -1529,10 +1576,6 @@ msgstr "Blouse" msgid "Username: " msgstr "Nom d'utilisateur : " -#: core/templates/core/user_edit.jinja:39 -msgid "Account number: " -msgstr "Numero de compte : " - #: core/templates/core/user_edit.jinja:42 msgid "Change my password" msgstr "Changer mon mot de passe" @@ -1576,7 +1619,7 @@ msgstr "Gestion de Sith" msgid "Subscriptions" msgstr "Cotisations" -#: core/templates/core/user_tools.jinja:22 counter/views.py:475 +#: core/templates/core/user_tools.jinja:22 counter/views.py:476 msgid "Counters" msgstr "Comptoirs" @@ -1650,7 +1693,7 @@ msgstr "Blouse : montrez aux autres à quoi ressemble votre blouse !" msgid "Bad image format, only jpeg, png, and gif are accepted" msgstr "Mauvais format d'image, seuls les jpeg, png, et gif sont acceptés" -#: core/views/user.py:178 +#: core/views/user.py:184 msgid "User already has a profile picture" msgstr "L'utilisateur a déjà une photo de profil" @@ -1730,7 +1773,7 @@ msgstr "Bureau" #: eboutic/templates/eboutic/eboutic_main.jinja:24 #: eboutic/templates/eboutic/eboutic_makecommand.jinja:8 #: eboutic/templates/eboutic/eboutic_payment_result.jinja:4 -#: sith/settings.py:286 sith/settings.py:294 sith/settings_sample.py:271 +#: sith/settings.py:282 sith/settings.py:290 sith/settings_sample.py:271 #: sith/settings_sample.py:279 msgid "Eboutic" msgstr "Eboutic" @@ -1768,8 +1811,8 @@ msgstr "quantité" msgid "Sith account" msgstr "Compte utilisateur" -#: counter/models.py:248 sith/settings.py:279 sith/settings.py:284 -#: sith/settings.py:306 sith/settings_sample.py:264 +#: counter/models.py:248 sith/settings.py:275 sith/settings.py:280 +#: sith/settings.py:302 sith/settings_sample.py:264 #: sith/settings_sample.py:269 sith/settings_sample.py:291 msgid "Credit card" msgstr "Carte bancaire" @@ -1969,65 +2012,65 @@ msgstr "ANN" msgid "You have not enough money to buy all the basket" msgstr "Vous n'avez pas assez d'argent pour acheter le panier" -#: counter/views.py:472 +#: counter/views.py:473 msgid "Parent product" msgstr "Produit parent" -#: counter/views.py:473 +#: counter/views.py:474 msgid "Buying groups" msgstr "Groupes d'achat" -#: counter/views.py:540 +#: counter/views.py:541 msgid "10 cents" msgstr "10 centimes" -#: counter/views.py:541 +#: counter/views.py:542 msgid "20 cents" msgstr "20 centimes" -#: counter/views.py:542 +#: counter/views.py:543 msgid "50 cents" msgstr "50 centimes" -#: counter/views.py:543 +#: counter/views.py:544 msgid "1 euro" msgstr "1 €" -#: counter/views.py:544 +#: counter/views.py:545 msgid "2 euros" msgstr "2 €" -#: counter/views.py:545 +#: counter/views.py:546 msgid "5 euros" msgstr "5 €" -#: counter/views.py:546 +#: counter/views.py:547 msgid "10 euros" msgstr "10 €" -#: counter/views.py:547 +#: counter/views.py:548 msgid "20 euros" msgstr "20 €" -#: counter/views.py:548 +#: counter/views.py:549 msgid "50 euros" msgstr "50 €" -#: counter/views.py:549 +#: counter/views.py:550 msgid "100 euros" msgstr "100 €" -#: counter/views.py:550 counter/views.py:552 counter/views.py:554 -#: counter/views.py:556 counter/views.py:558 +#: counter/views.py:551 counter/views.py:553 counter/views.py:555 +#: counter/views.py:557 counter/views.py:559 msgid "Check amount" msgstr "Montant du chèque" -#: counter/views.py:551 counter/views.py:553 counter/views.py:555 -#: counter/views.py:557 counter/views.py:559 +#: counter/views.py:552 counter/views.py:554 counter/views.py:556 +#: counter/views.py:558 counter/views.py:560 msgid "Check quantity" msgstr "Nombre de chèque" -#: counter/views.py:561 +#: counter/views.py:562 msgid "Emptied" msgstr "Coffre vidé" @@ -2179,12 +2222,12 @@ msgid "Washing and drying" msgstr "Lavage et séchage" #: launderette/templates/launderette/launderette_book.jinja:26 -#: sith/settings.py:420 sith/settings_sample.py:405 +#: sith/settings.py:416 sith/settings_sample.py:405 msgid "Washing" msgstr "Lavage" #: launderette/templates/launderette/launderette_book.jinja:30 -#: sith/settings.py:420 sith/settings_sample.py:405 +#: sith/settings.py:416 sith/settings_sample.py:405 msgid "Drying" msgstr "Séchage" @@ -2239,162 +2282,157 @@ msgstr "L'utilisateur n'a pas réservé de créneau" msgid "Token not found" msgstr "Jeton non trouvé" -#: sith/settings.py:174 sith/settings_sample.py:160 +#: sith/settings.py:170 sith/settings_sample.py:160 msgid "English" msgstr "Anglais" -#: sith/settings.py:175 sith/settings_sample.py:161 +#: sith/settings.py:171 sith/settings_sample.py:161 msgid "French" msgstr "Français" -#: sith/settings.py:276 sith/settings.py:283 sith/settings.py:304 +#: sith/settings.py:272 sith/settings.py:279 sith/settings.py:300 #: sith/settings_sample.py:261 sith/settings_sample.py:268 #: sith/settings_sample.py:289 msgid "Check" msgstr "Chèque" -#: sith/settings.py:277 sith/settings.py:285 sith/settings.py:305 +#: sith/settings.py:273 sith/settings.py:281 sith/settings.py:301 #: sith/settings_sample.py:262 sith/settings_sample.py:270 #: sith/settings_sample.py:290 msgid "Cash" msgstr "Espèces" -#: sith/settings.py:278 sith/settings_sample.py:263 +#: sith/settings.py:274 sith/settings_sample.py:263 msgid "Transfert" msgstr "Virement" -#: sith/settings.py:291 sith/settings_sample.py:276 +#: sith/settings.py:287 sith/settings_sample.py:276 msgid "Belfort" msgstr "Belfort" -#: sith/settings.py:292 sith/settings_sample.py:277 +#: sith/settings.py:288 sith/settings_sample.py:277 msgid "Sevenans" msgstr "Sevenans" -#: sith/settings.py:293 sith/settings_sample.py:278 +#: sith/settings.py:289 sith/settings_sample.py:278 msgid "Montbéliard" msgstr "Montbéliard" -#: sith/settings.py:333 sith/settings_sample.py:318 +#: sith/settings.py:329 sith/settings_sample.py:318 msgid "One semester" msgstr "Un semestre, 15 €" -#: sith/settings.py:338 sith/settings_sample.py:323 +#: sith/settings.py:334 sith/settings_sample.py:323 msgid "Two semesters" msgstr "Deux semestres, 28 €" -#: sith/settings.py:343 sith/settings_sample.py:328 +#: sith/settings.py:339 sith/settings_sample.py:328 msgid "Common core cursus" msgstr "Cursus tronc commun, 45 €" -#: sith/settings.py:348 sith/settings.py:353 sith/settings_sample.py:333 +#: sith/settings.py:344 sith/settings.py:349 sith/settings_sample.py:333 #: sith/settings_sample.py:338 msgid "Branch cursus" msgstr "Cursus branche, 45 €" -#: sith/settings.py:358 sith/settings_sample.py:343 +#: sith/settings.py:354 sith/settings_sample.py:343 msgid "Honorary member" msgstr "Membre honoraire, 0 €" -#: sith/settings.py:363 sith/settings_sample.py:348 +#: sith/settings.py:359 sith/settings_sample.py:348 msgid "Assidu member" msgstr "Membre d'Assidu, 0 €" -#: sith/settings.py:368 sith/settings_sample.py:353 +#: sith/settings.py:364 sith/settings_sample.py:353 msgid "Amicale/DOCEO member" msgstr "Membre de l'Amicale/DOCEO, 0 €" -#: sith/settings.py:373 sith/settings_sample.py:358 +#: sith/settings.py:369 sith/settings_sample.py:358 msgid "UT network member" msgstr "Cotisant du réseau UT, 0 €" -#: sith/settings.py:378 sith/settings_sample.py:363 +#: sith/settings.py:374 sith/settings_sample.py:363 msgid "CROUS member" msgstr "Membres du CROUS, 0 €" -#: sith/settings.py:383 sith/settings_sample.py:368 +#: sith/settings.py:379 sith/settings_sample.py:368 msgid "Sbarro/ESTA member" msgstr "Membre de Sbarro ou de l'ESTA, 15 €" -#: sith/settings.py:391 sith/settings_sample.py:376 +#: sith/settings.py:387 sith/settings_sample.py:376 msgid "President" msgstr "Président" -#: sith/settings.py:392 sith/settings_sample.py:377 +#: sith/settings.py:388 sith/settings_sample.py:377 msgid "Vice-President" msgstr "Vice-Président" -#: sith/settings.py:393 sith/settings_sample.py:378 +#: sith/settings.py:389 sith/settings_sample.py:378 msgid "Treasurer" msgstr "Trésorier" -#: sith/settings.py:394 sith/settings_sample.py:379 +#: sith/settings.py:390 sith/settings_sample.py:379 msgid "Communication supervisor" msgstr "Responsable com" -#: sith/settings.py:395 sith/settings_sample.py:380 +#: sith/settings.py:391 sith/settings_sample.py:380 msgid "Secretary" msgstr "Secrétaire" -#: sith/settings.py:396 sith/settings_sample.py:381 +#: sith/settings.py:392 sith/settings_sample.py:381 msgid "IT supervisor" msgstr "Responsable info" -#: sith/settings.py:397 sith/settings_sample.py:382 +#: sith/settings.py:393 sith/settings_sample.py:382 msgid "Board member" msgstr "Membre du bureau" -#: sith/settings.py:398 sith/settings_sample.py:383 +#: sith/settings.py:394 sith/settings_sample.py:383 msgid "Active member" msgstr "Membre actif" -#: sith/settings.py:399 sith/settings_sample.py:384 +#: sith/settings.py:395 sith/settings_sample.py:384 msgid "Curious" msgstr "Curieux" -#: subscription/models.py:16 +#: subscription/models.py:17 msgid "Bad subscription type" msgstr "Mauvais type de cotisation" -#: subscription/models.py:20 +#: subscription/models.py:21 msgid "Bad payment method" msgstr "Mauvais type de paiement" -#: subscription/models.py:47 +#: subscription/models.py:48 msgid "subscription type" msgstr "type d'inscription" -#: subscription/models.py:50 +#: subscription/models.py:51 msgid "subscription start" msgstr "début de la cotisation" -#: subscription/models.py:51 +#: subscription/models.py:52 msgid "subscription end" msgstr "fin de la cotisation" -#: subscription/models.py:54 +#: subscription/models.py:55 msgid "location" msgstr "lieu" -#: subscription/models.py:63 +#: subscription/models.py:64 msgid "You can not subscribe many time for the same period" msgstr "Vous ne pouvez pas cotiser plusieurs fois pour la même période" -#: subscription/models.py:67 +#: subscription/models.py:68 msgid "You are trying to create a subscription without member" msgstr "Vous essayez de créer une cotisation sans membre" -#: subscription/views.py:51 +#: subscription/views.py:52 msgid "A user with that email address already exists" msgstr "Un utilisateur avec cette adresse email existe déjà" -#: subscription/views.py:66 +#: subscription/views.py:68 msgid "You must either choose an existing user or create a new one properly" msgstr "" "Vous devez soit choisir un utilisateur existant, ou en créer un proprement." -#~ msgid "Hello, world. You're at the core index using Jinja2." -#~ msgstr "Hello, world! Vous êtes sur la page d'accueil utilisant Jinja2." - -#~ msgid "Pages" -#~ msgstr "Pages" diff --git a/subscription/models.py b/subscription/models.py index 9fb967d3..bac0a929 100644 --- a/subscription/models.py +++ b/subscription/models.py @@ -5,6 +5,7 @@ from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse +from django.contrib.auth.forms import PasswordResetForm from core.models import User @@ -70,8 +71,12 @@ class Subscription(models.Model): super(Subscription, self).save() from counter.models import Customer if not Customer.objects.filter(user=self.member).exists(): - last_id = Customer.objects.count() + 5195 # Number to keep a continuity with the old site + last_id = Customer.objects.count() + 1504 # Number to keep a continuity with the old site Customer(user=self.member, account_id=Customer.generate_account_id(last_id+1), amount=0).save() + form = PasswordResetForm({'email': self.member.email}) + if form.is_valid(): + form.save(use_https=True, email_template_name='core/new_user_email.jinja', + subject_template_name='core/new_user_email_subject.jinja', from_email="ae@utbm.fr") self.member.make_home() try: # Create subscription on the old site: TODO remove me! LOCATION = { diff --git a/subscription/views.py b/subscription/views.py index cc1c0143..9f8c9039 100644 --- a/subscription/views.py +++ b/subscription/views.py @@ -9,6 +9,7 @@ from django.forms import Select from django.conf import settings from ajax_select.fields import AutoCompleteSelectField +import random from subscription.models import Subscriber, Subscription from core.views import CanEditMixin, CanEditPropMixin, CanViewMixin @@ -54,6 +55,7 @@ class SubscriptionForm(forms.ModelForm): first_name = self.cleaned_data.get("first_name"), email = self.cleaned_data.get("email")) u.generate_username() + u.set_password(str(random.randrange(1000000, 10000000))) u.save() cleaned_data["member"] = u elif cleaned_data.get("member") is not None: