Commit graph

223 commits

Author SHA1 Message Date
Martin Pepin
d7d819dde0 Merge branch 'Aufinal/revente-cof-only' into 'master'
BdA-Revente n'est accessible qu'aux adhérents du COF

See merge request klub-dev-ens/gestioCOF!342
2019-01-14 20:30:33 +01:00
Ludovic Stephan
aa498e0261 BdA-Revente n'est accessible qu'au COF 2019-01-10 10:31:58 +01:00
Ludovic Stephan
a30955fb75 HTML corrections ; stupidtable injection 2019-01-07 14:58:31 +01:00
Ludovic Stephan
66104e1137 Black 2018-12-08 10:41:46 +01:00
Ludovic Stephan
15ab316909 Merge branch 'master' into Aufinal/prettify-revente 2018-12-08 10:40:10 +01:00
Ludovic Stephan
6be42d57ca Prettify revente/shotgun 2018-12-07 17:35:53 +01:00
Ludovic Stephan
5c8164dd3b Prettify revente/tirages 2018-12-07 17:35:40 +01:00
Ludovic Stephan
dbd017f680 Prettify revente/subscribe 2018-11-21 19:47:20 +01:00
Basile Clement
7f2f25cb71 Isort 2018-11-12 23:04:37 +01:00
Basile Clement
042ce80b78 Run black 2018-11-12 22:52:20 +01:00
Basile Clement
d7f4d32c92 Oh mon dieu! 2018-11-12 22:46:02 +01:00
Basile Clement
b80927efa3 Message d'erreur qui ne parle pas de object Voeu 2018-11-12 22:44:09 +01:00
Basile Clement
511981e762 Simplifie la Logique 2018-11-12 22:22:49 +01:00
Basile Clement
e09fa2b847 Affiche un message d'erreur lors de l'enregistrement des voeux BDA
Voir #203
2018-11-12 22:16:43 +01:00
Martin Pépin
1f350d60dd Merge branch 'master' into Aufinal/annul_reventes 2018-10-07 00:34:36 +02:00
Aurélien Delobelle
fdd2b35289 core -- Apply black + isort to all files 2018-10-06 13:15:33 +02:00
Ludovic Stephan
12ae10f2c4 Fix le transfert des reventes
Il y avait une typo qui causait une erreur quand on voulait transférer
une revente.
2018-05-30 10:13:37 +02:00
Martin Pépin
ea737dab29 Merge branch 'Kerl/drop_py2_compat' of git.eleves.ens.fr:cof-geek/gestioCOF into Kerl/drop_py2_compat 2018-04-16 14:18:21 +02:00
Martin Pépin
a73736bf41 Merge branch 'master' into Kerl/drop_py2_compat 2018-04-16 14:12:36 +02:00
Ludovic Stephan
fc37c5a8a0 Annulation des reventes
- On peut annuler des reventes à tout point du processus
- Le formulaire d'annulation donne plus d'informations
2018-04-13 10:54:45 +02:00
Aurélien Delobelle
42e762bc4a Py3 allows to shorten super() 2018-01-16 16:50:27 +01:00
Martin Pépin
5a5b60ec4d Merge branch 'master' into Kerl/drop_py2_compat 2018-01-10 20:12:59 +01:00
Ludovic Stephan
501d592d2f Merge branch 'master' into Aufinal/bda_fixes 2018-01-10 20:00:34 +01:00
Martin Pépin
475f1adec5 Remove "coding: utf8" line 2018-01-06 16:10:13 +01:00
Ludovic Stephan
1783196a9c Management view only deals with Revente objects
Except for Revente creation, every form is now handled with revente
objects, to use the display option in the previous commit.
2017-12-19 12:41:50 +01:00
Aurélien Delobelle
b0b0542407 Upgrade to Django 1.11
- Deprecation warnings using Django 1.8 are resolved.
- Deprecation warnings using Django 1.11 are resolved.

- Admin: grappelli is no longer used.
- Upgrade to django-autocomplete-light v3 (v2 is not 1.11 compatible).
  * autocomplete.modelform_factory being dropped, code uses dal Select2
    views and widgets.
2017-11-19 18:41:39 +01:00
Martin Pépin
f18959c0a1 BdA-Revente: meaningful names, some help tests 2017-11-01 17:26:40 +01:00
Ludovic Stephan
785555c05c Misc fixes 2017-10-26 12:40:11 +02:00
Ludovic Stephan
6a6549e0d7 Add notif time
In case of a gestioCOF bug, we keep the notification time in memory to
still do the drawing 1-3 days after.
2017-10-23 20:55:01 +02:00
Ludovic Stephan
919bcd197d Small code QoL improvements 2017-10-23 18:59:30 +02:00
Ludovic Stephan
e74dbb11f1 Organize revente files and function names 2017-10-23 18:39:45 +02:00
Ludovic Stephan
732e47707e Add unsubscribe option + list of current draws 2017-10-23 17:25:58 +02:00
Martin Pépin
d89ba1efe5 Fix catalogue behaviour if id=0 2017-09-20 18:21:59 +02:00
Martin Pépin
80f6a808dc Simplify the mails-rappel view 2017-06-18 17:03:50 +01:00
Martin Pépin
5c11893059 Add a link to the "bda-rappel" mail edition page 2017-06-02 19:33:23 +01:00
Martin Pépin
76c75d5ccd Move bda-participant template -> bda/ folder 2017-06-02 19:14:10 +01:00
Martin Pépin
31c034a96a send_rappel: use django messages + css tweaks 2017-06-02 19:14:06 +01:00
Martin Pépin
2a3614540f minor PEP8 changes 2017-06-02 17:32:23 +01:00
Aurélien Delobelle
0d8a613f28 improve bda inscription form/view code 2017-04-21 18:22:53 +02:00
Aurélien Delobelle
bbe6f41962 Fewer requests on descriptions and catalogue views 2017-04-08 13:44:21 +02:00
Aurélien Delobelle
98f355ed20 Fewer requests on unpaid view 2017-04-08 13:08:53 +02:00
Aurélien Delobelle
15d2faf8e1 Fewer requests on spectacles and participants list views 2017-04-08 13:01:05 +02:00
Aurélien Delobelle
93a3a9af2c Fewer requests with shotgunable reventes
bda.views.revente_shotgun:
- 2 requests instead of ~#spectacles requests
2017-04-08 12:53:37 +02:00
Aurélien Delobelle
fdc1128bd5 delete useless save 2017-04-08 12:12:56 +02:00
Aurélien Delobelle
d31101aff3 Empty SpectacleRevente and ChoixRevente before do_tirage.
- Usefull if a tirage is launched more than once.
- Ensure full reset of reventes for this tirage in this case.
2017-04-07 17:04:06 +02:00
Aurélien Delobelle
9f307c1bd0 Fewer db requests on bda tirage.
bda.algorithm
- use iterator to find max_groups, instead of a db request

bda.views.do_tirage
- select_related() are now focused on some relationships (they were
  taking useless relationships)
- bda-revente filling takes 1 request (each save and add was issuing
  1 request)
2017-04-07 16:22:10 +02:00
Aurélien Delobelle
3e0bd2e758 Fewer db requests on bda views.
bda.views.etat_places
- Use select_related on spectacles_set,  avoid query issue for each spectacle.
- `slots__sum` is computed in view, instead of a query.
- Cleaner code (and avoid useless computations).

bda.views.places
- Add select_related on places, avoid query issue for each spectacle.

bda.views.inscription
- 1 query for spectacle field choices, instead of (#forms in formset *
  #spectacles)
- Delete BaseBdaFormSet. The validation was redundant with
  `unique_together` of ChoixSpectacle model.
2017-04-07 13:25:50 +02:00
Martin Pépin
9ec151e040 A query optimization in bda.views.catalogue
We only need to fetch shows identifiers here:

    FOO.filter(BAR__in=shows)

which can be done using the `values_list` method
2017-04-05 20:48:18 +01:00
Martin Pépin
853a239e6e Rewrite bda.views.catalogue
- No string concatenations
- Use `get_object_or_404` instead of performing a `.get` and catching
  the eventual exception.
- More accurate error messages when a bad request is detected.
- More accurate error handling
2017-04-05 19:53:04 +01:00
Martin Pépin
a262983170 PEP8 compliance in bda.views 2017-04-04 23:51:22 +01:00