On fait pareil que précédemment pour les articles, en rajoutant une vie
de délétion + de quoi afficher qu'un article a été supprimé.
N.B. : le formatage automatique de VSCode fait plein de changements,
donc pourquoi pas les garder.
On rajoute un bouton de suppression d'un compte utilisable avec la perm
`kfet.delete_account`, avec message de vérif. On en profite pour
cleanup un peu le css de `jconfirm`.
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!
kfet.open app
- Base data (raw_open, last_update...) is stored and shared through cache system.
- 2 websockets groups: one for team users, one for other users.
- UI is initialized and kept up-to-date with WS.
- raw_open and force_close can be updated with standard HTTP requests.
At this time, there isn't any restriction on raw_open view. Common sense tell us
to change this behavior.
Misc
- Clean channels routing.
- 'PermConsumerMixin': user who sent the message is available as argument in
connection_groups method, which returns groups to which the user should be
appended on websocket connection (and discarded on disconnection).
- New kfet.utils module: should be used for mixins, whatever is useful and not concerns
the kfet app.
- Clean JS dependencies.
K-Fêt
- Integrate wagtail to serve "static" pages of old K-Fêt website
- Fixture "kfetcms/kfet_wagtail_17_05" contains a copy of old website
(as in May 2017).
- Media files can be got until end of June 17 at
http://partage.eleves.ens.fr//files/604e6dea2ceebc66b1936c6b3f911744/kfet_media.tar.gz
Login/logout
- Update package django_cas_ng to last version.
- Clean COFCASBackend.
- Change CAS version to 3 (version used on eleves.ens). This enables
the logout redirection (for CAS ofc).
- Add messages and clean existing ones on login/logout (for both
outsider and cas users).
Misc
- Update settings to bypass an incompability between debug-toolbar and
wagtailmenus packages.
- Better management of dev/test-specific urls (if debug-toolbar wasn't in
INSTALLED_APPS, media files were not served).
- UI improvements.
- add verbose names to ArticleCategory fields
- add button to view categories list from articles list
- fix article_update template in form validation
- improve interface for articlecategory_update
- revert vanished urls (happened in merge with master...)
Old configuration(/settings), based on Settings model, system is
deleted: SettingsForm, Settings.
New system use `django-djconfig` module.
- `kfet.config` module provides `kfet_config` to access configuration concerning
kfet app.
- Views, forms, models, etc now use this object to retrieve conf values.
- Views no longer add config values to context, instead templates use
`kfet_config` provided by a new context_processor.
- Enhance list and update views of settings.
- Fix: settings can directly be used without having to visit a specific
page...
Misc
- Delete some py2/3 imports
- Delete unused imports in kfet.models and kfet.views
- Some PEP8 compliance
kfet.statistic
- delete no longer used defs
- new mixin - ScaleMixin
- get scale args from GET params
- chunkify querysets according to a scale
Article stats
- use SingleResumeStat for manifest
- use ScaleMixin for sales
- update urls
- update permission required: teamkfet
Account stats
- update permission required: teamkfet
- operations use ScaleMixin
- fix manifests urls
K-Fêt - Statistics
New base class - StatScale
- create scale, given chunk size (timedelta), start and end times
- get labels of
- get start and end datetimes of chunks
DayStatScale: Scale whose chunks interval is 1 day
WeekStatScale: same with 1 week
MonthStatScale: same with 1 month
AccountStatOperationList: manifest of operations stats of an account
- renamed from AccountStatLastAll
- updated according to SingleResumeStat
AccountStatOperation:
- renamed from AccountStatLast
- remove scale logic with use of StatScale objects
- used scale is given by `scale` and `scale_args` GET params
- add filter on operations types with `types` GET param
AccountStatLast(Day,Week,Month) are deleted ("merged" in
AccountStatOperation)
New mixin: PkUrlMixin
- use with SingleObjectMixin standard django mixin (used by
DetailView...)
- `get_object` use field declared in `pk_url_kwarg` to get... the object
SingleResumeStat
- clean (part of) py code
AccountStatBalanceList
- renamed from `AccountStatBalanceAll`
- url modified
- add permission checking (only the connected user can get balance
stats manifest)
- clean py code
AccountStatBalance
- cleaner filtering management
- merge urls using this class
- clean py code