The objective is to move (at some point) all the management logic in
this app. Before that time: as long as the events app does not have all
the features necessary to be used in production it is only available in
dev mode and coexists with the old event system. When it's ready we'll
move the old events in the new app (data migration) and remove the old
system.
Toutes les pages Wagtail doivent désormais être traduites
Suppression du modèle COFUtilPage devenu inutile
Réinitialisation des migrations de Wagtail à cause des changements de ModelTranslation
La présence de DJDT sur l'interface admin multiplie par 100 environ
(sans exagération) les temps de chargement des pages, cause des 503, et
a une utilité au plus limitée. Cette MR vire donc l'addon de l'interface
admin.
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
cas.eleves.ens.fr has /serviceValidate, not /p3/serviceValidate, and is
thus *probably* a V2 CAS server. python-cas was broken and using
/serviceValidate for V3 while it should have been /p3/serviceValidate,
see
c3ac4b6c76
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.
- 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.
AccountBackend
- Should now work if used in AUTHENTICATION_BACKENDS settings.
- It does not retieve itself the password, as it should not be used
this way.
GenericBackend
- Delete useless 'username' arg of its 'authenticate()' method.
- Now delete the token in DB.
TemporaryAuthMiddleware
- New name of the middleware is more meaningful.
- Is now responsible to retrieve the password from the request, instead
of the AccountBackend.
GenericTeamToken model
- Add a manager' method to create token, avoiding possible error due to
unicity constraint.
GenericLoginView (authentication with the kfet generic user)
- Replace obscure system with a 100% HTTP handling.
- See comments for more information.
Misc
- More docstrings!
- More tests!
- Add some i18n.
- Add kfet/confirm_form.html template:
Ask user to confirm sth via a form (which will send a POST request).
Context variables:
* title: the page title
* confirm_url: action attribute for <form>
* text: displayed confirmation text
- kfet.js : Add functions allowing to emit POST request from <a> tag.
- Non-link nav items from kfet navbar also get a 'title'.
- A utility has been found for the 'sunglasses' glyphicon!