Commit graph

7 commits

Author SHA1 Message Date
Aurélien Delobelle fdd2b35289 core -- Apply black + isort to all files 2018-10-06 13:15:33 +02:00
Martin Pépin 97eed06b6f Remove builtins imports 2018-01-06 16:10:13 +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 b42452080f Mass cleaning of kfet' authentication machinery
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!
2017-09-25 17:57:47 +02:00
Aurélien Delobelle 85caa6b058 Use django-djconfig for kfet app.
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
2017-04-03 20:32:16 +02:00
Aurélien Delobelle fe7f84ffad Ajout message pour proposer connexion standard 2016-09-10 22:49:07 +02:00