Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
AE
Sith
Commits
1f31d3b5
Commit
1f31d3b5
authored
Aug 31, 2016
by
Skia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send a mail when someone is subscribed
parent
6af16cc8
Pipeline
#165
failed with stage
in 1 minute and 59 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
162 additions
and
97 deletions
+162
-97
core/templates/core/new_user_email.jinja
core/templates/core/new_user_email.jinja
+17
-0
core/templates/core/new_user_email_subject.jinja
core/templates/core/new_user_email_subject.jinja
+3
-0
locale/fr/LC_MESSAGES/django.mo
locale/fr/LC_MESSAGES/django.mo
+0
-0
locale/fr/LC_MESSAGES/django.po
locale/fr/LC_MESSAGES/django.po
+134
-96
subscription/models.py
subscription/models.py
+6
-1
subscription/views.py
subscription/views.py
+2
-0
No files found.
core/templates/core/new_user_email.jinja
0 → 100644
View file @
1f31d3b5
{%
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
%}
core/templates/core/new_user_email_subject.jinja
0 → 100644
View file @
1f31d3b5
{%
autoescape
off
%}
{%
trans
%}
New subscription to the UTBM student association
{%
endtrans
%}
{%
endautoescape
%}
locale/fr/LC_MESSAGES/django.mo
View file @
1f31d3b5
No preview for this file type
locale/fr/LC_MESSAGES/django.po
View file @
1f31d3b5
...
...
@@ -6,7 +6,7 @@
msgid
""
msgstr
""
"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 <skia@libskia.so>
\n
"
"Language-Team: AE info <ae.info@utbm.fr>
\n
"
...
...
@@ -134,7 +134,7 @@ msgid "comment"
msgstr
"commentaire"
#: accounting/models.py:181 counter/models.py:204 counter/models.py:247
#: subscription/models.py:5
2
#: subscription/models.py:5
3
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:28
7
sith/settings_sample.py:272
#: accounting/models.py:190 sith/settings.py:28
3
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:1
0
#: 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:
3
1
#: 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:56
0
#: counter/views.py:56
1
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:1
0
core/templates/core/file.jinja:41
#: club/templates/club/club_detail.jinja:1
1
core/templates/core/file.jinja:41
#: core/templates/core/page.jinja:34
msgid
"Prop"
msgstr
"Propriétés"
#: club/templates/club/club_detail.jinja:1
4
#: club/templates/club/club_detail.jinja:1
5
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:
1
3
#: club/templates/club/club_members.jinja:
2
3
#: 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:
1
3
#: core/templates/core/user_base.jinja:3
9
#: 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:5
2
#: core/templates/core/user_detail.jinja:5
3
#: 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:47
5
#: core/templates/core/user_tools.jinja:22 counter/views.py:47
6
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:1
7
8
#: core/views/user.py:18
4
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:28
6
sith/settings.py:29
4
sith/settings_sample.py:271
#: sith/settings.py:28
2
sith/settings.py:29
0
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:27
9
sith/settings.py:28
4
#: sith/settings.py:30
6
sith/settings_sample.py:264
#: counter/models.py:248 sith/settings.py:27
5
sith/settings.py:28
0
#: sith/settings.py:30
2
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:47
2
#: counter/views.py:47
3
msgid
"Parent product"
msgstr
"Produit parent"
#: counter/views.py:47
3
#: counter/views.py:47
4
msgid
"Buying groups"
msgstr
"Groupes d'achat"
#: counter/views.py:54
0
#: counter/views.py:54
1
msgid
"10 cents"
msgstr
"10 centimes"
#: counter/views.py:54
1
#: counter/views.py:54
2
msgid
"20 cents"
msgstr
"20 centimes"
#: counter/views.py:54
2
#: counter/views.py:54
3
msgid
"50 cents"
msgstr
"50 centimes"
#: counter/views.py:54
3
#: counter/views.py:54
4
msgid
"1 euro"
msgstr
"1 €"
#: counter/views.py:54
4
#: counter/views.py:54
5
msgid
"2 euros"
msgstr
"2 €"
#: counter/views.py:54
5
#: counter/views.py:54
6
msgid
"5 euros"
msgstr
"5 €"
#: counter/views.py:54
6
#: counter/views.py:54
7
msgid
"10 euros"
msgstr
"10 €"
#: counter/views.py:54
7
#: counter/views.py:54
8
msgid
"20 euros"
msgstr
"20 €"
#: counter/views.py:54
8
#: counter/views.py:54
9
msgid
"50 euros"
msgstr
"50 €"
#: counter/views.py:5
49
#: counter/views.py:5
50
msgid
"100 euros"
msgstr
"100 €"
#: counter/views.py:55
0
counter/views.py:55
2
counter/views.py:55
4
#: counter/views.py:55
6
counter/views.py:55
8
#: counter/views.py:55
1
counter/views.py:55
3
counter/views.py:55
5
#: counter/views.py:55
7
counter/views.py:55
9
msgid
"Check amount"
msgstr
"Montant du chèque"
#: counter/views.py:55
1
counter/views.py:55
3
counter/views.py:55
5
#: counter/views.py:55
7
counter/views.py:5
59
#: counter/views.py:55
2
counter/views.py:55
4
counter/views.py:55
6
#: counter/views.py:55
8
counter/views.py:5
60
msgid
"Check quantity"
msgstr
"Nombre de chèque"
#: counter/views.py:56
1
#: counter/views.py:56
2
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:4
20
sith/settings_sample.py:405
#: sith/settings.py:4
16
sith/settings_sample.py:405
msgid
"Washing"
msgstr
"Lavage"
#: launderette/templates/launderette/launderette_book.jinja:30
#: sith/settings.py:4
20
sith/settings_sample.py:405
#: sith/settings.py:4
16
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:17
4
sith/settings_sample.py:160
#: sith/settings.py:17
0
sith/settings_sample.py:160
msgid
"English"
msgstr
"Anglais"
#: sith/settings.py:17
5
sith/settings_sample.py:161
#: sith/settings.py:17
1
sith/settings_sample.py:161
msgid
"French"
msgstr
"Français"
#: sith/settings.py:27
6
sith/settings.py:2
83
sith/settings.py:30
4
#: sith/settings.py:27
2
sith/settings.py:2
79
sith/settings.py:30
0
#: sith/settings_sample.py:261 sith/settings_sample.py:268
#: sith/settings_sample.py:289
msgid
"Check"
msgstr
"Chèque"
#: sith/settings.py:27
7
sith/settings.py:28
5
sith/settings.py:30
5
#: sith/settings.py:27
3
sith/settings.py:28
1
sith/settings.py:30
1
#: sith/settings_sample.py:262 sith/settings_sample.py:270
#: sith/settings_sample.py:290
msgid
"Cash"
msgstr
"Espèces"
#: sith/settings.py:27
8
sith/settings_sample.py:263
#: sith/settings.py:27
4
sith/settings_sample.py:263
msgid
"Transfert"
msgstr
"Virement"
#: sith/settings.py:2
91
sith/settings_sample.py:276
#: sith/settings.py:2
87
sith/settings_sample.py:276
msgid
"Belfort"
msgstr
"Belfort"
#: sith/settings.py:2
92
sith/settings_sample.py:277
#: sith/settings.py:2
88
sith/settings_sample.py:277
msgid
"Sevenans"
msgstr
"Sevenans"
#: sith/settings.py:29
3
sith/settings_sample.py:278
#: sith/settings.py:2
8
9 sith/settings_sample.py:278
msgid
"Montbéliard"
msgstr
"Montbéliard"
#: sith/settings.py:3
33
sith/settings_sample.py:318
#: sith/settings.py:3
29
sith/settings_sample.py:318
msgid
"One semester"
msgstr
"Un semestre, 15 €"
#: sith/settings.py:33
8
sith/settings_sample.py:323
#: sith/settings.py:33
4
sith/settings_sample.py:323
msgid
"Two semesters"
msgstr
"Deux semestres, 28 €"
#: sith/settings.py:3
4
3 sith/settings_sample.py:328
#: sith/settings.py:33
9
sith/settings_sample.py:328
msgid
"Common core cursus"
msgstr
"Cursus tronc commun, 45 €"
#: sith/settings.py:34
8
sith/settings.py:3
53
sith/settings_sample.py:333
#: sith/settings.py:34
4
sith/settings.py:3
49
sith/settings_sample.py:333
#: sith/settings_sample.py:338
msgid
"Branch cursus"
msgstr
"Cursus branche, 45 €"
#: sith/settings.py:35
8
sith/settings_sample.py:343
#: sith/settings.py:35
4
sith/settings_sample.py:343
msgid
"Honorary member"
msgstr
"Membre honoraire, 0 €"
#: sith/settings.py:3
63
sith/settings_sample.py:348
#: sith/settings.py:3
59
sith/settings_sample.py:348
msgid
"Assidu member"
msgstr
"Membre d'Assidu, 0 €"
#: sith/settings.py:36
8
sith/settings_sample.py:353
#: sith/settings.py:36
4
sith/settings_sample.py:353
msgid
"Amicale/DOCEO member"
msgstr
"Membre de l'Amicale/DOCEO, 0 €"
#: sith/settings.py:3
73
sith/settings_sample.py:358
#: sith/settings.py:3
69
sith/settings_sample.py:358
msgid
"UT network member"
msgstr
"Cotisant du réseau UT, 0 €"
#: sith/settings.py:37
8
sith/settings_sample.py:363
#: sith/settings.py:37
4
sith/settings_sample.py:363
msgid
"CROUS member"
msgstr
"Membres du CROUS, 0 €"
#: sith/settings.py:3
83
sith/settings_sample.py:368
#: sith/settings.py:3
79
sith/settings_sample.py:368
msgid
"Sbarro/ESTA member"
msgstr
"Membre de Sbarro ou de l'ESTA, 15 €"
#: sith/settings.py:3
91
sith/settings_sample.py:376
#: sith/settings.py:3
87
sith/settings_sample.py:376
msgid
"President"
msgstr
"Président"
#: sith/settings.py:3
92
sith/settings_sample.py:377
#: sith/settings.py:3
88
sith/settings_sample.py:377
msgid
"Vice-President"
msgstr
"Vice-Président"
#: sith/settings.py:39
3
sith/settings_sample.py:378
#: sith/settings.py:3
8
9 sith/settings_sample.py:378
msgid
"Treasurer"
msgstr
"Trésorier"
#: sith/settings.py:39
4
sith/settings_sample.py:379
#: sith/settings.py:39
0
sith/settings_sample.py:379
msgid
"Communication supervisor"
msgstr
"Responsable com"
#: sith/settings.py:39
5
sith/settings_sample.py:380
#: sith/settings.py:39
1
sith/settings_sample.py:380
msgid
"Secretary"
msgstr
"Secrétaire"
#: sith/settings.py:39
6
sith/settings_sample.py:381
#: sith/settings.py:39
2
sith/settings_sample.py:381
msgid
"IT supervisor"
msgstr
"Responsable info"
#: sith/settings.py:39
7
sith/settings_sample.py:382
#: sith/settings.py:39
3
sith/settings_sample.py:382
msgid
"Board member"
msgstr
"Membre du bureau"
#: sith/settings.py:39
8
sith/settings_sample.py:383
#: sith/settings.py:39
4
sith/settings_sample.py:383
msgid
"Active member"
msgstr
"Membre actif"
#: sith/settings.py:39
9
sith/settings_sample.py:384
#: sith/settings.py:39
5
sith/settings_sample.py:384
msgid
"Curious"
msgstr
"Curieux"
#: subscription/models.py:1
6
#: subscription/models.py:1
7
msgid
"Bad subscription type"
msgstr
"Mauvais type de cotisation"
#: subscription/models.py:2
0
#: subscription/models.py:2
1
msgid
"Bad payment method"
msgstr
"Mauvais type de paiement"
#: subscription/models.py:4
7
#: subscription/models.py:4
8
msgid
"subscription type"
msgstr
"type d'inscription"
#: subscription/models.py:5
0
#: subscription/models.py:5
1
msgid
"subscription start"
msgstr
"début de la cotisation"
#: subscription/models.py:5
1
#: subscription/models.py:5
2
msgid
"subscription end"
msgstr
"fin de la cotisation"
#: subscription/models.py:5
4
#: subscription/models.py:5
5
msgid
"location"
msgstr
"lieu"
#: subscription/models.py:6
3
#: subscription/models.py:6
4
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:6
7
#: subscription/models.py:6
8
msgid
"You are trying to create a subscription without member"
msgstr
"Vous essayez de créer une cotisation sans membre"
#: subscription/views.py:5
1
#: subscription/views.py:5
2
msgid
"A user with that email address already exists"
msgstr
"Un utilisateur avec cette adresse email existe déjà"
#: subscription/views.py:6
6
#: subscription/views.py:6
8
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"
subscription/models.py
View file @
1f31d3b5
...
...
@@ -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
=
{
...
...
subscription/views.py
View file @
1f31d3b5
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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