Since allauth is installed, users are not automatically logged out of CAS
when logging out GestioCOF.
This change simplifies the view and avoid being stuck because of
the redirect to the logout page, which happened via a GET request and so
prompting to confirm.
Refer to allauth doc for an accurate features list:
http://django-allauth.readthedocs.io/en/latest/
Users can now change their password, ask for a password reset, or set
one if they don't have one.
In particular, it allows users whose account has been created via a
clipper authentication to configure a password before losing their
clipper. Even if they have already lost it, they are able to get one
using the "Reset password" functionality.
Allauth multiple emails management is deactivated. Requests to the
related url redirect to the home page.
All the login and logout views are replaced by the allauth' ones. It
also concerns the Django and Wagtail admin sites.
Note that users are no longer logged out of the clipper CAS server when
they authenticated via this server. Instead a message suggests the user
to disconnect.
Clipper connections and `login_clipper`
---------------------------------------
- Non-empty `login_clipper` are now unique among `CofProfile` instances.
- They are created once for users with a non-empty 'login_clipper' (with
the data migration 0014_create_clipper_connections).
- The `login_clipper` of CofProfile instances are sync with their
clipper connections:
* `CofProfile.sync_clipper_connections` method updates the
connections based on `login_clipper`.
* Signals receivers `sync_clipper…` update `login_clipper` based on
connections creations/updates/deletions.
Misc
----
- Add NullCharField (model field) which allows to use `unique=True` on
CharField (even with empty strings).
- Parts of kfet mixins for TestCase are now in shared.tests.testcase,
as they are used elsewhere than in the kfet app.
- Why? Because it should be the actual behavior.
- To allow using arithmetic operations with values of DecimalField when
object are not retrieved from DB, some strings are replaced by Decimal
or int.
If you wonder why it's not automatically done, see:
https://code.djangoproject.com/ticket/27825
Many tables in kfet app templates become sortable:
account list, negative account list, article list, article inventory
list, article supplier list, article category list, checkout list,
checkout statement list, inventory list, inventory details, order list,
order creation, order details.
This is achieved thanks to the jQuery plugin 'tablesorter':
https://mottie.github.io/tablesorter/docs/
- Affected tables also got sticky headers (it stays visible on scroll).
- Dates format are modified in order to ease the date sorting with the
plugin (it avoids writing a custom parser, or an extractor from
additional hidden element in the table cells).
- Tables whose content is classified by category (of articles) now uses
several tbodies. This has minor effects on the tables style.
- Tags of the header help signs become 'i', instead of 'span', in order
to avoid weird spacing.
- 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.