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
9a9eb527
Commit
9a9eb527
authored
Sep 20, 2018
by
Soldat
🤦🏻
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cotiz' into 'master'
add 1 day cotiz See merge request
!157
parents
be36b7f3
cd7672f0
Pipeline
#1520
passed with stage
in 6 minutes and 21 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
27 deletions
+86
-27
locale/fr/LC_MESSAGES/django.po
locale/fr/LC_MESSAGES/django.po
+31
-27
sith/settings.py
sith/settings.py
+5
-0
subscription/migrations/0009_auto_20180920_1421.py
subscription/migrations/0009_auto_20180920_1421.py
+20
-0
subscription/migrations/0010_auto_20180920_1441.py
subscription/migrations/0010_auto_20180920_1441.py
+20
-0
subscription/tests.py
subscription/tests.py
+10
-0
No files found.
locale/fr/LC_MESSAGES/django.po
View file @
9a9eb527
...
...
@@ -6,7 +6,7 @@
msgid
""
msgstr
""
"Report-Msgid-Bugs-To:
\n
"
"POT-Creation-Date: 2018-09-0
1
1
7
:4
2
+0200
\n
"
"POT-Creation-Date: 2018-09-
2
0 1
4
:4
1
+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
"
...
...
@@ -4412,12 +4412,12 @@ msgid "Washing and drying"
msgstr
"Lavage et séchage"
#: launderette/templates/launderette/launderette_book.jinja:27
#: sith/settings.py:57
0
#: sith/settings.py:57
5
msgid
"Washing"
msgstr
"Lavage"
#: launderette/templates/launderette/launderette_book.jinja:31
#: sith/settings.py:57
0
#: sith/settings.py:57
5
msgid
"Drying"
msgstr
"Séchage"
...
...
@@ -4736,103 +4736,107 @@ msgstr "Bénévole Eurockéennes"
msgid
"Six weeks for free"
msgstr
"6 semaines gratuites"
#: sith/settings.py:534
#: sith/settings.py:517
msgid
"One day"
msgstr
"Un jour"
#: sith/settings.py:539
msgid
"President"
msgstr
"Président"
#: sith/settings.py:5
35
#: sith/settings.py:5
40
msgid
"Vice-President"
msgstr
"Vice-Président"
#: sith/settings.py:5
36
#: sith/settings.py:5
41
msgid
"Treasurer"
msgstr
"Trésorier"
#: sith/settings.py:5
37
#: sith/settings.py:5
42
msgid
"Communication supervisor"
msgstr
"Responsable communication"
#: sith/settings.py:53
8
#: sith/settings.py:5
4
3
msgid
"Secretary"
msgstr
"Secrétaire"
#: sith/settings.py:5
39
#: sith/settings.py:5
44
msgid
"IT supervisor"
msgstr
"Responsable info"
#: sith/settings.py:54
0
#: sith/settings.py:54
5
msgid
"Board member"
msgstr
"Membre du bureau"
#: sith/settings.py:54
1
#: sith/settings.py:54
6
msgid
"Active member"
msgstr
"Membre actif"
#: sith/settings.py:54
2
#: sith/settings.py:54
7
msgid
"Curious"
msgstr
"Curieux"
#: sith/settings.py:5
77
#: sith/settings.py:5
82
msgid
"A new poster needs to be moderated"
msgstr
"Une nouvelle affiche a besoin d'être modérée"
#: sith/settings.py:5
7
8
#: sith/settings.py:58
3
msgid
"A new mailing list needs to be moderated"
msgstr
"Une nouvelle mailing list a besoin d'être modérée"
#: sith/settings.py:5
79
#: sith/settings.py:5
84
#, python-format
msgid
"There are %s fresh news to be moderated"
msgstr
"Il y a %s nouvelles toutes fraîches à modérer"
#: sith/settings.py:58
0
#: sith/settings.py:58
5
msgid
"New files to be moderated"
msgstr
"Nouveaux fichiers à modérer"
#: sith/settings.py:58
1
#: sith/settings.py:58
6
#, python-format
msgid
"There are %s pictures to be moderated in the SAS"
msgstr
"Il y a %s photos à modérer dans le SAS"
#: sith/settings.py:58
2
#: sith/settings.py:58
7
msgid
"You've been identified on some pictures"
msgstr
"Vous avez été identifié sur des photos"
#: sith/settings.py:58
3
#: sith/settings.py:58
8
#, python-format
msgid
"You just refilled of %s €"
msgstr
"Vous avez rechargé votre compte de %s€"
#: sith/settings.py:58
4
#: sith/settings.py:58
9
#, python-format
msgid
"You just bought %s"
msgstr
"Vous avez acheté %s"
#: sith/settings.py:5
85
#: sith/settings.py:5
90
msgid
"You have a notification"
msgstr
"Vous avez une notification"
#: sith/settings.py:
597
#: sith/settings.py:
602
msgid
"Success!"
msgstr
"Succès !"
#: sith/settings.py:
598
#: sith/settings.py:
603
msgid
"Fail!"
msgstr
"Échec !"
#: sith/settings.py:
599
#: sith/settings.py:
604
msgid
"You successfully posted an article in the Weekmail"
msgstr
"Article posté avec succès dans le Weekmail"
#: sith/settings.py:60
0
#: sith/settings.py:60
5
msgid
"You successfully edited an article in the Weekmail"
msgstr
"Article édité avec succès dans le Weekmail"
#: sith/settings.py:60
1
#: sith/settings.py:60
6
msgid
"You successfully sent the Weekmail"
msgstr
"Weekmail envoyé avec succès"
#: sith/settings.py:61
0
#: sith/settings.py:61
5
msgid
"AE tee-shirt"
msgstr
"Tee-shirt AE"
...
...
sith/settings.py
View file @
9a9eb527
...
...
@@ -512,6 +512,11 @@ SITH_SUBSCRIPTIONS = {
'name'
:
_
(
'Six weeks for free'
),
'price'
:
0
,
'duration'
:
0.23
,
},
'un-jour'
:
{
'name'
:
_
(
'One day'
),
'price'
:
0
,
'duration'
:
0.00555333
,
}
# To be completed....
}
...
...
subscription/migrations/0009_auto_20180920_1421.py
0 → 100644
View file @
9a9eb527
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-09-20 12:21
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'subscription'
,
'0008_auto_20180831_2016'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'subscription'
,
name
=
'subscription_type'
,
field
=
models
.
CharField
(
choices
=
[(
'amicale/doceo'
,
'Amicale/DOCEO member'
),
(
'assidu'
,
'Assidu member'
),
(
'benevoles-euroks'
,
"Eurok's volunteer"
),
(
'crous'
,
'CROUS member'
),
(
'cursus-alternant'
,
'Alternating cursus'
),
(
'cursus-branche'
,
'Branch cursus'
),
(
'cursus-tronc-commun'
,
'Common core cursus'
),
(
'deux-mois-essai'
,
'Two months for free'
),
(
'deux-semestres'
,
'Two semesters'
),
(
'membre-honoraire'
,
'Honorary member'
),
(
'reseau-ut'
,
'UT network member'
),
(
'sbarro/esta'
,
'Sbarro/ESTA member'
),
(
'six-semaines-essai'
,
'Six weeks for free'
),
(
'un-jour'
,
'Un jour'
),
(
'un-semestre'
,
'One semester'
),
(
'un-semestre-welcome'
,
'One semester Welcome Week'
)],
max_length
=
255
,
verbose_name
=
'subscription type'
),
),
]
subscription/migrations/0010_auto_20180920_1441.py
0 → 100644
View file @
9a9eb527
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-09-20 12:41
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'subscription'
,
'0009_auto_20180920_1421'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'subscription'
,
name
=
'subscription_type'
,
field
=
models
.
CharField
(
choices
=
[(
'amicale/doceo'
,
'Amicale/DOCEO member'
),
(
'assidu'
,
'Assidu member'
),
(
'benevoles-euroks'
,
"Eurok's volunteer"
),
(
'crous'
,
'CROUS member'
),
(
'cursus-alternant'
,
'Alternating cursus'
),
(
'cursus-branche'
,
'Branch cursus'
),
(
'cursus-tronc-commun'
,
'Common core cursus'
),
(
'deux-mois-essai'
,
'Two months for free'
),
(
'deux-semestres'
,
'Two semesters'
),
(
'membre-honoraire'
,
'Honorary member'
),
(
'reseau-ut'
,
'UT network member'
),
(
'sbarro/esta'
,
'Sbarro/ESTA member'
),
(
'six-semaines-essai'
,
'Six weeks for free'
),
(
'un-jour'
,
'One day'
),
(
'un-semestre'
,
'One semester'
),
(
'un-semestre-welcome'
,
'One semester Welcome Week'
)],
max_length
=
255
,
verbose_name
=
'subscription type'
),
),
]
subscription/tests.py
View file @
9a9eb527
...
...
@@ -117,6 +117,16 @@ class SubscriptionIntegrationTest(TestCase):
s
.
save
()
self
.
assertTrue
(
s
.
subscription_end
==
date
(
2017
,
10
,
29
))
def
test_duration_two_months
(
self
):
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
self
.
user
.
pk
).
first
(),
subscription_type
=
list
(
settings
.
SITH_SUBSCRIPTIONS
.
keys
())[
3
],
payment_method
=
settings
.
SITH_SUBSCRIPTION_PAYMENT_METHOD
[
0
])
s
.
subscription_start
=
date
(
2017
,
8
,
29
)
s
.
subscription_end
=
s
.
compute_end
(
duration
=
settings
.
SITH_SUBSCRIPTIONS
[
'un-jour'
][
'duration'
],
start
=
s
.
subscription_start
)
s
.
save
()
self
.
assertTrue
(
s
.
subscription_end
==
date
(
2017
,
8
,
30
))
def
test_duration_three_months
(
self
):
s
=
Subscription
(
member
=
User
.
objects
.
filter
(
pk
=
self
.
user
.
pk
).
first
(),
subscription_type
=
list
(
settings
.
SITH_SUBSCRIPTIONS
.
keys
())[
3
],
...
...
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