Commit graph

465 commits

Author SHA1 Message Date
Ludovic Stephan
445745ee15 Merge branch 'master' into Aufinal/prettify-revente
Merge remote-tracking branch 'origin/master' into Aufinal/prettify-revente
2019-01-07 22:34:28 +01:00
Aurélien Delobelle
84c88dfd5e Merge branch 'master' into aureplop/site-cof 2019-01-06 00:56:21 +01:00
Aurélien Delobelle
39eaf4b109 style -- black + isort 2019-01-06 00:37:08 +01:00
Evarin
376cc96343 Clean, lint and fix little things 2019-01-06 00:17:57 +01:00
Evarin
f105225abf Commentaires dans le code 2019-01-05 18:50:53 +01:00
Aurélien Delobelle
debbf265c4 style -- Linters for petitscours, fix isort 2019-01-05 18:19:26 +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
Martin Pepin
633cd49094 Merge branch 'Elarnon/cofburo_required' into 'master'
Améliore l'ergonomie de `cof_required` et `buro_required`

See merge request klub-dev-ens/gestioCOF!333
2018-11-27 10:13:32 +01:00
Basile Clement
5f9695ef8e isort 2018-11-25 18:32:04 +01:00
Basile Clement
2e08951d44 Améliore l'ergonomie de cof_required et buro_required
Ce patch rend les décorateurs `cof_required` et `buro_required` plus
agréables pour les utilisateurs; en particulier, ils ne font plus une
redirection sur la page de connexion si la condition n'est pas remplie.

Dans les deux cas :

 - Si l'utilisateur n'est pas connecté, il est renvoyé sur la page de
   connexion

 - Si l'utilisateur est connecté mais pas membre du COF/du Burô, une
   page d'erreur "403 Forbidden" est affichée.  Dans le cas de
   `cof_required` cette page demande à l'utilisateur de s'inscrire au
   COF; dans le cas `buro_required` elle indique simplement que la page
   est réservée au Burô.

gestioncof/
 * gestioncof/templates/buro-denied.html:  Ajouté.
 * decorators.py:

bda/
 * tests/test_views.py:
       Modifié pour correctement gérer le nouveau fonctionnement des
       décorateurs.
2018-11-25 18:11:23 +01:00
Basile Clement
c960d97b67 Extrait les petits cours dans une application séparée
L'application `petitscours` reste assez fortement couplée à
`gestioncof`, et n'est pas (encore ?) faite pour être utilisée
séparément.

De façon similaire, et afin de minimiser de potentiels problèmes dûs à
des migrations, les modèles de l'application `petitscours` utilisent
`app_label = "gestioncof"` pour que Django les considère comme faisant
partie de l'application `"gestioncof"`.  Ils pourront être migrés dans
un second temps si cela s'avère nécessaire.

Les changements sont nombreux, mais assez simples: il s'agit
principalement de déplacer des fichiers et changer des imports.  J'ai
également profité de l'occasion pour réorganiser les templates afin de
les placer dans l'espace de nom "petitscours/".

cof/
 * settings/common.py: Add `petitscours` app
 * urls.py: Use `petitscours.urls`

petitscours/
 * __init__.py: Added.
 * tests/__init__.py: Added.
 * tests/utils.py: Added.
 * urls.py: Added.

gestioncof/
 * admin.py:
 * management/commands/loaddevdata.py:
 * models.py:
 * signals.py: Typo.
 * urls.py:
       Moved petitscours_patterns to petitscours.urls
 * petits_cours_forms.py:
       Moved to petitscours/forms.py
 * petits_cours_models.py:
       Moved to petitscours/models.py
 * petits_cours_views.py:
       Moved to petitscours/views.py
 * tests/utils.py:
 * tests/test_petitscours_views.py:
       Moved to petitscours/tests/test_petitscours_views.py
 * templates/base_title_petitscours.html:
       Moved to petitscours/templates/petitscours/base_title.html
 * templates/demande-petit-cours.html:
       Moved topetitscours/templates/petitscours/demande.html
 * templates/gestioncof/details_demande_petit_cours.html:
       Moved to petitscours/templates/petitscours/demande_detail.html
 * templates/petits_cours_demandes_list.html:
       Moved to petitscours/templates/petitscours/demande_list.html
 * templates/demande-petit-cours-raw.html:
       Moved to petitscours/templates/petitscours/demande_raw.html
 * templates/details_demande_petit_cours_infos.html:
       Moved to petitscours/templates/petitscours/details_demande_infos.html
 * templates/inscription-petit-cours.html:
       Moved to petitscours/templates/petitscours/inscription.html
 * templates/inscription-petit-cours-formset.html:
       Moved to petitscours/templates/petitscours/inscription_formset.html
 * templates/gestioncof/traitement_demande_petit_cours.html:
       Moved to petitscours/templates/petitscours/traitement_demande.html
 * templates/gestioncof/traitement_demande_petit_cours_autre_niveau.html:
       Moved to petitscours/templates/petitscours/traitement_demande_autre_niveau.html
 * templates/gestioncof/traitement_demande_petit_cours_success.html:
       Moved to petitscours/templates/petitscours/traitement_demande_success.html
2018-11-25 13:25:16 +01:00
Basile Clement
4e34583e3f black 2018-11-25 00:23:43 +01:00
Basile Clement
d48cb3aaed petitcours.tests -- Deplace les tests dans leur propre fichier 2018-11-25 00:22:12 +01:00
Martin Pépin
712588af7d Merge branch 'master' into evarin/site-cof 2018-11-19 23:30:33 +01:00
Aurélien Delobelle
0fe63d3eae petitcours.tests -- Add tests for demande (raw) views 2018-10-27 22:29:55 +02:00
Aurélien Delobelle
3d27dc9a41 petitcours.tests -- Add tests for inscription and (re)traitement views 2018-10-27 19:18:58 +02:00
Aurélien Delobelle
1a5bbf32a4 petitcours.tests -- Add tests for demandes list and details views 2018-10-27 19:18:58 +02:00
Aurélien Delobelle
25dfe2f496 petitcours.tests -- Add PCAbility, PCDemande and PCSubject factories 2018-10-27 19:18:58 +02:00
Aurélien Delobelle
8be913cbf9 style -- black 2018-10-27 13:37:39 +02:00
Evarin
128a9e32c0 I18n des menus 2018-10-14 16:29:26 +02:00
Evarin
1e3850bb6b Nettoyage dates et calendrier 2018-10-14 15:50:55 +02:00
Martin Pépin
9da9649a45 Use the syncmail command as defined in custommail 2018-10-07 00:55:54 +02:00
Aurélien Delobelle
402b544393 core -- Fix flake8 errors 2018-10-06 13:15:33 +02:00
Aurélien Delobelle
fdd2b35289 core -- Apply black + isort to all files 2018-10-06 13:15:33 +02:00
Martin Pepin
b39b6d6bb3 Merge branch 'aureplop/cof-tests_registration' into 'master'
cof -- Add tests for registration views

See merge request cof-geek/gestioCOF!287
2018-10-06 11:25:44 +02:00
Aurélien Delobelle
3eb939928f Merge branch 'master' into Kerl/tests 2018-09-30 13:08:58 +02:00
Aurélien Delobelle
10f4bd02d5 Merge branch 'master' into aureplop/cof-tests_registration 2018-09-30 12:57:35 +02:00
Aurélien Delobelle
064c23902b cof.tests -- Address flake8 concerns 2018-09-30 12:56:58 +02:00
Aurélien Delobelle
44e5387f15 cof.tests -- Really check initial of built form 2018-09-30 12:56:36 +02:00
Martin Pépin
f297a1a0cf update hardcoded Mega views for 2018… 2018-09-09 07:20:18 +02:00
Martin Pépin
327ef210db make unernestaparis visible in forms 2018-09-02 23:26:18 +02:00
Martin Pépin
73cf39baa8 missing migration 2018-09-02 23:25:58 +02:00
Theo Delemazure
91393dcea7 Update models.py 2018-09-02 20:34:09 +02:00
Martin Pépin
898a354c2d Members can change their registration email 2018-08-05 18:11:10 +02:00
Evarin
6d6ba70bd7 CSS++ 2018-06-30 15:38:12 +02:00
Martin Pépin
68e71317cb Hotfix: broken urls for mailing lists 2018-06-01 17:08:24 +02:00
Martin Pépin
7e9df3fc72 hotfix: wrong url name 2018-05-28 00:09:30 +02:00
Aurélien Delobelle
ece9a54df3 Upgrade to reCAPTCHA v2
reCAPTCHA v1 has been shut down since March 2018.

We now uses reCAPTCHA v2:
- user must check a simple checkbox (No CAPTCHA),
- eventually he must validate a challenge.

Moving keys settings allows to use the captcha for development.

Fixes #192.
2018-05-14 13:22:59 +02:00
Evarin
6d72644ee3 Clean code up 2018-04-28 15:59:49 +02:00
Martin Pépin
e21666a112 Fix old-style urls (registration) 2018-04-16 16:34:34 +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
Martin Pépin
87a6722143 Merge branch 'master' into Aufinal/bda_fixes 2018-04-07 14:46:07 +02:00
Martin Pépin
7512454825 Merge branch 'master' into aureplop/cof-tests_registration 2018-04-07 13:20:33 +02:00
Martin Pépin
71a61fe31d Merge branch 'master' into aureplop/cof-tests_misc 2018-04-07 12:41:42 +02:00
Martin Pépin
6328cdaa19 Tests: the order of our csv files is not relevant 2018-04-07 12:05:16 +02:00
Martin Pépin
ee33762845 Merge branch 'master' into aureplop/cof-tests_export 2018-04-07 11:24:05 +02:00
Martin Pépin
660f395b67 Merge branch 'master' into aureplop/cof-tests_club 2018-04-07 10:49:52 +02:00
Martin Pépin
60d8e76fee Merge branch 'master' into aureplop/cof-tests_calendar 2018-04-07 10:24:41 +02:00
Martin Pépin
623047dca2 Fix old-style reversal of calendar urls 2018-04-06 11:11:02 +02:00
Martin Pépin
bf464f9378 Merge branch 'master' into aureplop/cof-tests_event 2018-04-06 00:16:08 +02:00
Evarin
3d091f50b5 Suppr captcha page, ajout block iframe 2018-03-21 21:53:48 +01:00
Evarin
6d6c995563 Fixtures fonctionnelles 2018-02-20 17:13:21 +01:00
Basile Clement
3314670cab Various fixes for Django 1.11
- The {% cycle %} command was used non-quoted arguments separated by
   commas, while it is supposed to use quoted arguments separated by
   spaces (I'm actually not sure how that ever worked :)

 - django-bootstrap-form was at version 3.2.1 which is not compatible
   with Django 1.11 (but also required by GestioCOF). I upgraded it to
   version 3.3.
2018-02-11 19:09:07 +01:00
Martin Pepin
8f0eec0e88 Merge branch 'aureplop/cof-tests_survey' into 'master'
cof -- Add tests for survey views

See merge request cof-geek/gestioCOF!285
2018-02-06 13:48:46 +01:00
Evarin
63ce694b4d Fix dependency 2018-02-03 22:39:50 +01:00
Evarin
59116f2d46 International wagtail urls 2018-02-03 22:34:37 +01:00
Evarin
88e911ff9d Fixtures mises à jour 2018-01-28 23:45:46 +01:00
Evarin
ba87044638 Calendrier dynamique + sympa + jolies dates 2018-01-28 23:44:48 +01:00
Evarin
f8952225d6 Apparence et Responsiveness 2018-01-28 19:10:14 +01:00
Evarin
c11ccf2ecc Tri des annuaires 2018-01-28 19:09:35 +01:00
Aurélien Delobelle
afa6972280 Better handling of non-authorized users in config edition view 2018-01-22 21:59:41 +01:00
Aurélien Delobelle
0235c4f7e8 Fix profile edition view
- Fix a typo.
- Bump version of django-bootstrap-form to be comaptible with Django
1.11.
2018-01-22 21:59:41 +01:00
Aurélien Delobelle
f8361b9114 Add & fix urls naming 2018-01-22 21:59:41 +01:00
Aurélien Delobelle
0876a004e5 Name urls of export views (cof members, mega) 2018-01-22 21:59:41 +01:00
Aurélien Delobelle
91162addb9 cof -- Add tests for some views 2018-01-22 21:59:41 +01:00
Aurélien Delobelle
bd89dce11d Add testing helpers to create superuser 2018-01-22 21:38:01 +01:00
Evarin
8488beeb4e Un seul modèle pour les actus 2018-01-22 21:24:20 +01:00
Aurélien Delobelle
a813507ddd Name urls of export views (cof members, mega) 2018-01-22 14:59:57 +01:00
Aurélien Delobelle
f371606cdb cof -- Add tests for export views 2018-01-22 14:58:38 +01:00
Aurélien Delobelle
38539a9d53 Name url to export calendar to ical 2018-01-21 18:19:43 +01:00
Aurélien Delobelle
acf284862a Users should be able to refuse to subscribe to shows and events 2018-01-21 18:17:27 +01:00
Aurélien Delobelle
2e6a54c7db cof -- Add tests for calendar views 2018-01-21 18:17:26 +01:00
Aurélien Delobelle
bbe46645f7 cof -- Fix the club list view 2018-01-20 22:24:25 +01:00
Aurélien Delobelle
a5071aa257 cof -- Add tests for club views 2018-01-20 22:24:13 +01:00
Evarin
8551ffcfd3 Merge branch 'master' into evarin/site-cof 2018-01-20 19:37:12 +01:00
Evarin
ea495e8f29 Archives beta 2018-01-20 19:33:50 +01:00
Aurélien Delobelle
4084444dc3 Fix autocomplete in registration views.
django-autocomplete-light v3.x doesn't include anymore the
$('').yourlabsAutocomplete() function, leading to issues in cof
registration and kfet account creation views.

Adding jquery-autocomplete-light fixes these issues.

See:
- (dal) https://github.com/yourlabs/django-autocomplete-light
- (jal) https://github.com/yourlabs/jquery-autocomplete-light
2018-01-20 17:29:15 +01:00
Aurélien Delobelle
7bf2f73e72 Merge branch 'aureplop/cof_tests' into aureplop/cof-tests_registration 2018-01-20 17:02:54 +01:00
Aurélien Delobelle
c239f28f17 syncmails should be able to be silent 2018-01-20 17:02:23 +01:00
Aurélien Delobelle
0921f32e4c cof -- Fix urls naming related to registration 2018-01-20 16:17:57 +01:00
Aurélien Delobelle
7160a9c954 cof -- Add tests for registration views 2018-01-20 16:14:55 +01:00
Aurélien Delobelle
dfb9ccb0af Fix use of Widget.build_attrs in TriStateCheckbox
Signature changed in Django 1.11.
2018-01-19 18:41:06 +01:00
Aurélien Delobelle
a6f52cfdc5 cof -- Fix urls naming in event template 2018-01-19 18:38:34 +01:00
Aurélien Delobelle
f5b280896f cof -- Add tests for event views 2018-01-19 18:36:03 +01:00
Aurélien Delobelle
ce73499077 Fix use of Widget.build_attrs in TriStateCheckbox
Signature changed in Django 1.11.
2018-01-19 18:15:57 +01:00
Aurélien Delobelle
8675948d9e cof -- Fix urls naming in survey templates 2018-01-19 18:01:36 +01:00
Aurélien Delobelle
57de31d59a cof -- Add tests for survey views 2018-01-19 17:57:43 +01:00
Aurélien Delobelle
776ff28141 cof -- Add helpers to test cof views. 2018-01-19 17:52:08 +01: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
c80e63415b Load custommails before bda tests 2018-01-07 14:30:33 +01:00
Martin Pépin
57411ab46f Remove __future__ imports 2018-01-06 16:10:13 +01:00
Martin Pépin
475f1adec5 Remove "coding: utf8" line 2018-01-06 16:10:13 +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
Martin Pépin
e1794a654f Merge branch 'master' into Aufinal/bda_fixes 2017-11-01 11:25:52 +01:00
Martin Pépin
1a136088bf Add missing type in custommail (dev only) 2017-10-25 22:08:29 +02:00