Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
88762c49
Commit
88762c49
authored
Jun 06, 2017
by
Sli
Browse files
Subscriptions stats optimisations + form for start and end date
parent
1c056717
Pipeline
#1020
passed with stage
in 4 minutes and 37 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
locale/fr/LC_MESSAGES/django.po
View file @
88762c49
...
...
@@ -6,7 +6,7 @@
msgid
""
msgstr
""
"Report-Msgid-Bugs-To:
\n
"
"POT-Creation-Date: 2017-06-0
2 14:5
5+0200
\n
"
"POT-Creation-Date: 2017-06-0
6 23:2
5+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
"
...
...
@@ -126,8 +126,8 @@ msgstr "numéro"
msgid
"journal"
msgstr
"classeur"
#: accounting/models.py:254 core/models.py:
596
core/models.py:9
6
7
#: core/models.py:10
07
counter/models.py:276 counter/models.py:324
#: accounting/models.py:254 core/models.py:
600
core/models.py:97
1
#: core/models.py:10
11
counter/models.py:276 counter/models.py:324
#: counter/models.py:450 eboutic/models.py:39 eboutic/models.py:72
#: forum/models.py:236 forum/models.py:308 stock/models.py:76
msgid
"date"
...
...
@@ -293,7 +293,7 @@ msgstr "Liste des types comptable"
#: accounting/templates/accounting/label_list.jinja:9
#: accounting/templates/accounting/operation_edit.jinja:9
#: accounting/templates/accounting/simplifiedaccountingtype_list.jinja:9
#: core/templates/core/user_tools.jinja:5
4
#: core/templates/core/user_tools.jinja:5
5
msgid
"Accounting"
msgstr
"Comptabilité"
...
...
@@ -312,7 +312,7 @@ msgstr "Il n'y a pas de types comptable dans ce site web."
#: accounting/templates/accounting/bank_account_details.jinja:4
#: accounting/templates/accounting/bank_account_details.jinja:13
#: core/templates/core/user_tools.jinja:6
3
#: core/templates/core/user_tools.jinja:6
4
msgid
"Bank account: "
msgstr
"Compte en banque : "
...
...
@@ -371,7 +371,7 @@ msgstr "Nouveau compte club"
#: com/templates/com/news_admin_list.jinja:72
#: com/templates/com/weekmail.jinja:32 com/templates/com/weekmail.jinja:61
#: core/templates/core/file.jinja:38 core/templates/core/page.jinja:31
#: core/templates/core/user_tools.jinja:
39
core/views/user.py:177
#: core/templates/core/user_tools.jinja:
40
core/views/user.py:177
#: counter/templates/counter/cash_summary_list.jinja:53
#: counter/templates/counter/counter_list.jinja:17
#: counter/templates/counter/counter_list.jinja:32
...
...
@@ -497,7 +497,7 @@ msgstr "Voir"
#: accounting/templates/accounting/co_list.jinja:4
#: accounting/templates/accounting/journal_details.jinja:18
#: core/templates/core/user_tools.jinja:
59
#: core/templates/core/user_tools.jinja:
60
msgid
"Company list"
msgstr
"Liste des entreprises"
...
...
@@ -863,7 +863,7 @@ msgid "Club list"
msgstr
"Liste des clubs"
#: club/templates/club/club_list.jinja:21
#: core/templates/core/user_tools.jinja:
19
#: core/templates/core/user_tools.jinja:
20
msgid
"New club"
msgstr
"Nouveau club"
...
...
@@ -982,7 +982,8 @@ msgstr "Quantité"
#: counter/templates/counter/cash_summary_list.jinja:35
#: counter/templates/counter/last_ops.jinja:44
#: counter/templates/counter/stats.jinja:18
#: subscription/templates/subscription/stats.jinja:28
#: subscription/templates/subscription/stats.jinja:33
#: subscription/templates/subscription/stats.jinja:41
msgid
"Total"
msgstr
"Total"
...
...
@@ -995,7 +996,7 @@ msgid "Payment method"
msgstr
"Méthode de paiement"
#: club/templates/club/club_tools.jinja:4
#: core/templates/core/user_tools.jinja:9
5
#: core/templates/core/user_tools.jinja:9
6
msgid
"Club tools"
msgstr
"Outils club"
...
...
@@ -1067,7 +1068,7 @@ msgid "Begin date"
msgstr
"Date de début"
#: club/views.py:196 com/views.py:123 counter/views.py:1020
#: election/views.py:131
#: election/views.py:131
subscription/views.py:50
msgid
"End date"
msgstr
"Date de fin"
...
...
@@ -1122,7 +1123,7 @@ msgstr "résumé"
msgid
"content"
msgstr
"contenu"
#: com/models.py:63 core/models.py:100
6
launderette/models.py:84
#: com/models.py:63 core/models.py:10
1
0 launderette/models.py:84
#: launderette/models.py:109 launderette/models.py:145 stock/models.py:59
#: stock/models.py:98
msgid
"type"
...
...
@@ -1132,7 +1133,7 @@ msgstr "type"
msgid
"author"
msgstr
"auteur"
#: com/models.py:66 core/models.py:
597
#: com/models.py:66 core/models.py:
601
msgid
"is moderated"
msgstr
"est modéré"
...
...
@@ -1262,7 +1263,7 @@ msgid "Edit news"
msgstr
"Éditer la nouvelle"
#: com/templates/com/news_edit.jinja:8 com/templates/com/news_edit.jinja:30
#: core/templates/core/user_tools.jinja:8
1
#: core/templates/core/user_tools.jinja:8
2
msgid
"Create news"
msgstr
"Créer nouvelle"
...
...
@@ -1308,7 +1309,7 @@ msgid "Coming soon... don't miss!"
msgstr
"Prochainement... à ne pas rater!"
#: com/templates/com/weekmail.jinja:5 com/templates/com/weekmail.jinja.py:9
#: com/views.py:61 core/templates/core/user_tools.jinja:
79
#: com/views.py:61 core/templates/core/user_tools.jinja:
80
msgid
"Weekmail"
msgstr
"Weekmail"
...
...
@@ -1398,7 +1399,7 @@ msgstr "Le mot de la fin"
msgid
"Communication administration"
msgstr
"Administration de la communication"
#: com/views.py:66 core/templates/core/user_tools.jinja:8
0
#: com/views.py:66 core/templates/core/user_tools.jinja:8
1
msgid
"Weekmail destinations"
msgstr
"Destinataires du Weekmail"
...
...
@@ -1414,7 +1415,7 @@ msgstr "Message d'info"
msgid
"Alert message"
msgstr
"Message d'alerte"
#: com/views.py:122 election/views.py:130
#: com/views.py:122 election/views.py:130
subscription/views.py:47
msgid
"Start date"
msgstr
"Date de début"
...
...
@@ -1685,109 +1686,109 @@ msgstr "Un utilisateur de ce nom d'utilisateur existe déjà"
msgid
"Profile"
msgstr
"Profil"
#: core/models.py:55
4
#: core/models.py:55
8
msgid
"Visitor"
msgstr
"Visiteur"
#: core/models.py:5
59
#: core/models.py:5
63
msgid
"do you want to receive the weekmail"
msgstr
"voulez-vous recevoir le Weekmail"
#: core/models.py:56
4
#: core/models.py:56
8
msgid
"define if we show a users stats"
msgstr
"Definit si l'on montre les statistiques de l'utilisateur"
#: core/models.py:5
66
#: core/models.py:5
70
msgid
"Show your account statistics to others"
msgstr
"Montrez vos statistiques de compte aux autres"
#: core/models.py:58
5
#: core/models.py:58
9
msgid
"file name"
msgstr
"nom du fichier"
#: core/models.py:5
86
core/models.py:79
4
#: core/models.py:5
90
core/models.py:79
8
msgid
"parent"
msgstr
"parent"
#: core/models.py:5
87
core/models.py:60
3
#: core/models.py:5
91
core/models.py:60
7
msgid
"file"
msgstr
"fichier"
#: core/models.py:5
88
#: core/models.py:5
92
msgid
"compressed file"
msgstr
"version allégée"
#: core/models.py:5
8
9
#: core/models.py:59
3
msgid
"thumbnail"
msgstr
"miniature"
#: core/models.py:59
0
core/models.py:
598
#: core/models.py:59
4
core/models.py:
602
msgid
"owner"
msgstr
"propriétaire"
#: core/models.py:59
1
core/models.py:80
0
core/views/files.py:146
#: core/models.py:59
5
core/models.py:80
4
core/views/files.py:146
msgid
"edit group"
msgstr
"groupe d'édition"
#: core/models.py:59
2
core/models.py:80
1
core/views/files.py:147
#: core/models.py:59
6
core/models.py:80
5
core/views/files.py:147
msgid
"view group"
msgstr
"groupe de vue"
#: core/models.py:59
3
#: core/models.py:59
7
msgid
"is folder"
msgstr
"est un dossier"
#: core/models.py:59
4
#: core/models.py:59
8
msgid
"mime type"
msgstr
"type mime"
#: core/models.py:59
5
#: core/models.py:59
9
msgid
"size"
msgstr
"taille"
#: core/models.py:
599
#: core/models.py:
603
msgid
"asked for removal"
msgstr
"retrait demandé"
#: core/models.py:60
0
#: core/models.py:60
4
msgid
"is in the SAS"
msgstr
"est dans le SAS"
#: core/models.py:63
9
#: core/models.py:6
4
3
msgid
"Character '/' not authorized in name"
msgstr
"Le caractère '/' n'est pas autorisé dans les noms de fichier"
#: core/models.py:64
2
core/models.py:6
47
#: core/models.py:64
6
core/models.py:6
51
msgid
"Loop in folder tree"
msgstr
"Boucle dans l'arborescence des dossiers"
#: core/models.py:65
1
#: core/models.py:65
5
msgid
"You can not make a file be a children of a non folder file"
msgstr
""
"Vous ne pouvez pas mettre un fichier enfant de quelque chose qui n'est pas "
"un dossier"
#: core/models.py:65
5
#: core/models.py:65
9
msgid
"Duplicate file"
msgstr
"Un fichier de ce nom existe déjà"
#: core/models.py:6
69
#: core/models.py:6
73
msgid
"You must provide a file"
msgstr
"Vous devez fournir un fichier"
#: core/models.py:73
5
#: core/models.py:73
9
msgid
"Folder: "
msgstr
"Dossier : "
#: core/models.py:7
37
#: core/models.py:7
41
msgid
"File: "
msgstr
"Fichier : "
#: core/models.py:78
5
#: core/models.py:78
9
msgid
"page unix name"
msgstr
"nom unix de la page"
#: core/models.py:7
8
9
#: core/models.py:79
3
msgid
""
"Enter a valid page name. This value may contain only unaccented letters, "
"numbers and ./+/-/_ characters."
...
...
@@ -1795,51 +1796,51 @@ msgstr ""
"Entrez un nom de page correct. Uniquement des lettres non accentuées, "
"numéros, et ./+/-/_"
#: core/models.py:
797
#: core/models.py:
801
msgid
"page name"
msgstr
"nom de la page"
#: core/models.py:
798
#: core/models.py:
802
msgid
"owner group"
msgstr
"groupe propriétaire"
#: core/models.py:80
2
#: core/models.py:80
6
msgid
"lock user"
msgstr
"utilisateur bloquant"
#: core/models.py:80
3
#: core/models.py:80
7
msgid
"lock_timeout"
msgstr
"décompte du déblocage"
#: core/models.py:83
0
#: core/models.py:83
4
msgid
"Duplicate page"
msgstr
"Une page de ce nom existe déjà"
#: core/models.py:8
36
#: core/models.py:8
40
msgid
"Loop in page tree"
msgstr
"Boucle dans l'arborescence des pages"
#: core/models.py:96
4
#: core/models.py:96
8
msgid
"revision"
msgstr
"révision"
#: core/models.py:96
5
#: core/models.py:96
9
msgid
"page title"
msgstr
"titre de la page"
#: core/models.py:9
66
#: core/models.py:9
70
msgid
"page content"
msgstr
"contenu de la page"
#: core/models.py:100
4
#: core/models.py:100
8
msgid
"url"
msgstr
"url"
#: core/models.py:100
5
#: core/models.py:100
9
msgid
"param"
msgstr
"param"
#: core/models.py:10
08
#: core/models.py:10
12
msgid
"viewed"
msgstr
"vue"
...
...
@@ -2401,7 +2402,7 @@ msgid "Eboutic invoices"
msgstr
"Facture eboutic"
#: core/templates/core/user_account.jinja:53
#: core/templates/core/user_tools.jinja:3
3
counter/views.py:561
#: core/templates/core/user_tools.jinja:3
4
counter/views.py:561
msgid
"Etickets"
msgstr
"Etickets"
...
...
@@ -2590,121 +2591,126 @@ msgstr "Fusionner deux utilisateurs"
msgid
"Subscriptions"
msgstr
"Cotisations"
#: core/templates/core/user_tools.jinja:24 counter/views.py:531
#: core/templates/core/user_tools.jinja:19
#: subscription/templates/subscription/stats.jinja:4
msgid
"Subscription stats"
msgstr
"Statistiques de cotisation"
#: core/templates/core/user_tools.jinja:25 counter/views.py:531
#: counter/views.py:685
msgid
"Counters"
msgstr
"Comptoirs"
#: core/templates/core/user_tools.jinja:2
7
#: core/templates/core/user_tools.jinja:2
8
msgid
"General management"
msgstr
"Gestion générale"
#: core/templates/core/user_tools.jinja:2
8
#: core/templates/core/user_tools.jinja:2
9
msgid
"General counters management"
msgstr
"Gestion générale des comptoirs"
#: core/templates/core/user_tools.jinja:
29
#: core/templates/core/user_tools.jinja:
30
msgid
"Products management"
msgstr
"Gestion des produits"
#: core/templates/core/user_tools.jinja:3
0
#: core/templates/core/user_tools.jinja:3
1
msgid
"Product types management"
msgstr
"Gestion des types de produit"
#: core/templates/core/user_tools.jinja:3
1
#: core/templates/core/user_tools.jinja:3
2
#: counter/templates/counter/cash_summary_list.jinja:23 counter/views.py:551
msgid
"Cash register summaries"
msgstr
"Relevés de caisse"
#: core/templates/core/user_tools.jinja:3
2
#: core/templates/core/user_tools.jinja:3
3
#: counter/templates/counter/invoices_call.jinja:4 counter/views.py:556
msgid
"Invoices call"
msgstr
"Appels à facture"
#: core/templates/core/user_tools.jinja:4
0
core/views/user.py:204
#: core/templates/core/user_tools.jinja:4
1
core/views/user.py:204
#: counter/templates/counter/counter_list.jinja:18
#: counter/templates/counter/counter_list.jinja:33
#: counter/templates/counter/counter_list.jinja:54
msgid
"Stats"
msgstr
"Stats"
#: core/templates/core/user_tools.jinja:4
4
#: core/templates/core/user_tools.jinja:4
5
#: counter/templates/counter/counter_list.jinja:37
#: stock/templates/stock/stock_item_list.jinja:11
#: stock/templates/stock/stock_list.jinja:16
msgid
"Shopping lists"
msgstr
"Liste de courses"
#: core/templates/core/user_tools.jinja:4
6
#: core/templates/core/user_tools.jinja:4
7
#: counter/templates/counter/counter_list.jinja:39
msgid
"Create new stock"
msgstr
"Créer nouveau stock"
#: core/templates/core/user_tools.jinja:5
7
#: core/templates/core/user_tools.jinja:5
8
msgid
"Refound Account"
msgstr
"Rembourser un compte"
#: core/templates/core/user_tools.jinja:5
8
#: core/templates/core/user_tools.jinja:5
9
msgid
"General accounting"
msgstr
"Comptabilité générale"
#: core/templates/core/user_tools.jinja:6
8
#: core/templates/core/user_tools.jinja:6
9
msgid
"Club account: "
msgstr
"Compte club : "
#: core/templates/core/user_tools.jinja:7
5
#: core/templates/core/user_tools.jinja:7
6
msgid
"Communication"
msgstr
"Communication"
#: core/templates/core/user_tools.jinja:7
8
#: core/templates/core/user_tools.jinja:7
9
msgid
"Create weekmail article"
msgstr
"Rédiger un nouvel article dans le Weekmail"
#: core/templates/core/user_tools.jinja:8
2
#: core/templates/core/user_tools.jinja:8
3
msgid
"Moderate news"
msgstr
"Modérer les nouvelles"
#: core/templates/core/user_tools.jinja:8
3
#: core/templates/core/user_tools.jinja:8
4
msgid
"Edit index page"
msgstr
"Éditer la page d'accueil"
#: core/templates/core/user_tools.jinja:8
4
#: core/templates/core/user_tools.jinja:8
5
msgid
"Edit alert message"
msgstr
"Éditer le message d'alerte"
#: core/templates/core/user_tools.jinja:8
5
#: core/templates/core/user_tools.jinja:8
6
msgid
"Edit information message"
msgstr
"Éditer le message d'informations"
#: core/templates/core/user_tools.jinja:8
6
#: core/templates/core/user_tools.jinja:8
7
msgid
"Moderate files"
msgstr
"Modérer les fichiers"
#: core/templates/core/user_tools.jinja:
8
9
#: core/templates/core/user_tools.jinja:9
0
msgid
"Moderate pictures"
msgstr
"Modérer les photos"
#: core/templates/core/user_tools.jinja:10
2
#: core/templates/core/user_tools.jinja:10
3
msgid
"Elections"
msgstr
"Élections"
#: core/templates/core/user_tools.jinja:10
4
#: core/templates/core/user_tools.jinja:10
5
msgid
"See available elections"
msgstr
"Voir les élections disponibles"
#: core/templates/core/user_tools.jinja:10
6
#: core/templates/core/user_tools.jinja:10
7
msgid
"Create a new election"
msgstr
"Créer une nouvelle élection"
#: core/templates/core/user_tools.jinja:10
9
#: core/templates/core/user_tools.jinja:1
1
0
msgid
"Other tools"
msgstr
"Autres outils"
#: core/templates/core/user_tools.jinja:11
1
#: core/templates/core/user_tools.jinja:11
2
msgid
"Convert dokuwiki/BBcode syntax to Markdown"
msgstr
"Convertir de la syntaxe dokuwiki/BBcode vers Markdown"
#: core/templates/core/user_tools.jinja:11
2
#: core/templates/core/user_tools.jinja:11
3
msgid
"Trombi tools"
msgstr
"Outils Trombi"
...
...
@@ -3073,6 +3079,7 @@ msgstr "Pas de date de naissance renseignée"
#: launderette/templates/launderette/launderette_admin.jinja:35
#: launderette/templates/launderette/launderette_click.jinja:13
#: sas/templates/sas/picture.jinja:82
#: subscription/templates/subscription/stats.jinja:14
msgid
"Go"
msgstr
"Valider"
...
...
@@ -4362,20 +4369,16 @@ msgstr "Vous ne pouvez pas cotiser plusieurs fois pour la même période"
msgid
"Subscription error"
msgstr
"Erreur de cotisation"
#: subscription/templates/subscription/stats.jinja:4
msgid
"Subscription stats"
msgstr
"Statistiques de cotisation"
#: subscription/templates/subscription/stats.jinja:9
#: subscription/templates/subscription/stats.jinja:18
msgid
"Total subscriptions"
msgstr
"Cotisations totales"
#: subscription/templates/subscription/stats.jinja:1
0
#: subscription/templates/subscription/stats.jinja:1
9
msgid
"Subscriptions by type"
msgstr
"Cotisations par type"
#: subscription/templates/subscription/stats.jinja:
1
9
msgid
"Subscripton type"
#: subscription/templates/subscription/stats.jinja:
2
9
msgid
"Subscript
i
on type"
msgstr
"Type de cotisation"
#: subscription/templates/subscription/subscription.jinja:22
...
...
@@ -4383,11 +4386,11 @@ msgid "Eboutic is reserved to specific users. In doubt, don't use it."
msgstr
""
"Eboutic est réservé à des cas particuliers. Dans le doute, ne l'utilisez pas."
#: subscription/views.py:
75
#: subscription/views.py:
86
msgid
"A user with that email address already exists"
msgstr
"Un utilisateur avec cette adresse email existe déjà"
#: subscription/views.py:
9
1
#: subscription/views.py:1
02
msgid
"You must either choose an existing user or create a new one properly"
msgstr
""
"Vous devez soit choisir un utilisateur existant, soit en créer un proprement"
...
...
subscription/templates/subscription/stats.jinja
View file @
88762c49
...
...
@@ -6,17 +6,27 @@
{%
block
content
%}
{%
trans
%}
Total subscriptions
{%
endtrans
%}
:
{{
subscriptions_total.count
()
}}
<br><br>
{%
trans
%}
Subscriptions by type
{%
endtrans
%}
<br><br>
{%
for
location
in
locations
%}
{{
location
[
1
]
}}
{{
subscriptions_total.filter
(
location
=
location
[
0
])
.
count
()
}}
<br>
{%
endfor
%}
<p>
{{
form.start_date.label
}}
<br>
{{
form.start_date
}}
<br><br>
{{
form.end_date.label
}}
<br>
{{
form.end_date
}}
<br>
<p><input
type=
"submit"
value=
"
{%
trans
%}
Go
{%
endtrans
%}
"
/></p>
</p>
<p>
{%
trans
%}
Total subscriptions
{%
endtrans
%}
:
{{
subscriptions_total.count
()
}}
<br><br>
{%
trans
%}
Subscriptions by type
{%
endtrans
%}
<br><br>
{%
for
location
in
locations
%}
{{
location
[
1
]
}}
:
{{
subscriptions_total.filter
(
location
=
location
[
0
])
.
count
()
}}
<br>
{%
endfor
%}
<p>
<br>
<table>
<tr>
<th>
{%
trans
%}
Subscripton type
{%
endtrans
%}
</th>
<th>
{%
trans
%}
Subscript
i
on type
{%
endtrans
%}
</th>
{%
for
location
in
locations
%}
<th>
{{
location
[
1
]
}}
</th>
{%
endfor
%}
...
...
@@ -24,15 +34,17 @@
{%
for
type
in
subscriptions_types
%}
<tr>
<td>
{{
subscriptions_types
[
type
][
'name'
]
}}
</td>
{%
set
subscriptions_total_type
=
subscriptions_total.
filter
(
subscription_type
=
type
)
%}
{%
for
location
in
locations
%}
<td>
{%
trans
%}
Total
{%
endtrans
%}
:
{{
subscriptions_total.filter
(
subscription_type
=
type
,
location
=
location
[
0
])
.
count
()
}}
<br>
{%
set
subscriptions_total_type_location
=
subscriptions_total_type.
filter
(
location
=
location
[
0
])
%}
{%
trans
%}
Total
{%
endtrans
%}
:
{{
subscriptions_total_type_location.count
()
}}
<br>
{%
for
p_type
in
payment_types
%}
{{
p_type
[
1
]
}}
:
{{
subscriptions_total
.filter
(
subscription_type
=
type
,
location
=
location
[
0
],
payment_method
=
p_type
[
0
])
.
count
()
}}
<br>
{{
p_type
[
1
]
}}
:
{{
subscriptions_total
_type_location.filter
(
payment_method
=
p_type
[
0
])
.
count
()
}}
<br>
{%
endfor
%}
</td>
{%
endfor
%}
<td>
{{
subscriptions_total
.filter
(
subscription_type
=
type
)
.
count
()
}}
<td>
{{
subscriptions_total
_type
.count
()
}}
</tr>
{%
endfor
%}
</table>
...
...
subscription/views.py
View file @
88762c49
...
...
@@ -22,12 +22,10 @@
#
#
from
django.shortcuts
import
render
from
django.views.generic.edit
import
UpdateView
,
CreateView
from
django.views.generic.base
import
View
from
django.views.generic
import
TemplateView
from
django.views.generic.edit
import
CreateView
,
FormView
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.core.exceptions
import
PermissionDenied
,
ValidationError
from
django.core.urlresolvers
import
reverse_lazy
from
django.db
import
IntegrityError
from
django
import
forms
from
django.forms
import
Select
...
...
@@ -38,8 +36,21 @@ import random
from
subscription.models
import
Subscription
from
core.views
import
CanEditMixin
,
CanEditPropMixin
,
CanViewMixin
from
core.views.forms
import
SelectDateTime
from
core.models
import
User
class
SelectionDateForm
(
forms
.
Form
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
SelectionDateForm
,
self
).
__init__
(
*
args
,
**
kwargs
)
self
.
fields
[
'start_date'
]
=
forms
.
DateTimeField
(
[
'%Y-%m-%d %H:%M:%S'
],
label
=
_
(
"Start date"
),
widget
=
SelectDateTime
,
required
=
True
)
self
.
fields
[
'end_date'
]
=
forms
.
DateTimeField
(
[
'%Y-%m-%d %H:%M:%S'
],
label
=
_
(
"End date"
),
widget
=
SelectDateTime
,
required
=
True
)