K-Fêt - Wagtail
- Page content becomes a StreamField.
- GroupTeam snippet becomes a block for stream field.
- Navigation menu moved becomes a "flatmenu", preventing possible future conflicts.
- Page layout can be modified in wagtail admin.
K-Fêt
- Add shorthands for ukf account balance/article price.
- Cleaning stylesheets and templates.
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.
Préparation au passage à postgres
- Suppression du champ num du modèle CofProfile.
- Suppression des LOCK (spécifique MySQL).
- Le code devient compatible avec tous les backends supportés par Django.
- Suppressions de code servant à la compatibilité python2.
- Corrige le message de succès à la fin de l'inscription. Celui-ci ne prenait pas en compte le statut is_cof à jour du profil.
See merge request !234
If content type for old kfet.GlobalPermissions exists:
- custom permissions related to this content type are updated to new content types,
- then we can safely remove this content type.
- Add handler for CheckboxSelectMultiple in form_field_snippet.html.
- Add template filter "widget_type" to get widget class name.
- Group permissions selection becomes easier.
- Add css transitions on buttons + navbar links.
- Clean css of navbar.
- Clean templates with only centered form/content.
- Page opened when login as generic team user close itself (only for
non-CAS users).
- A message is added when generic team user connects.
- Fix extra space on right when messages are prompted.
- Non-K-Fêt group membership is no longer erased by the account edit
form.
- Add some tests to ensure proposed choices in this form corresponds to
K-Fêt groups + test case for #161.
Fixes#161
- Add total boxes in cellar and bar to new inventory view.
- On this view, table is "minified".
- Revert background color for some templates.
- Clean some margin (responsively).
- Clean tab pills on account read.
- Current day remains on the screen on history.
- Message for generic team user connection is sended only if user is
connecting from a k-fet url.
- Less contrast on history.
- Like perform operations, cancel_operations can add/remove an account
from negative accounts system.
- Balances checks are now performed against real_balance instead of
balance.
So if someone with a balance_offset go, for real, to positive land (ie even
without taking into account the balance offset), its account is removed from
the negative system.
- Fix bug on real_balance when negative exists but balance_offset is
not set.
Fixes#156.
Order create view use WeekScale. No query improvements, only shorter
code.
Scale/ScaleMixin:
- Two methods directly relative to the Scale class move to... the Scale
class.
- Fix order create on Chrome.
Scales:
- Fix #chunks when used with std_chunk=True (there was one too many at
the beginning)
- Scale.end gives the end of the last chunk (instead of its start)
So scale.begin -> scale.end gives the full range of the scale.
`kfet_day` now returns an aware datetime.
ScaleMixin:
- new method `get_by_chunks` which use only one query and ranks
elements according to the scale. Elements are returned by a generator
for each scale chunk (and all chunks are returned as a generator too).
ArticlesStatSales and AccountStatOperations use this new method to
avoid issuing #scale_chunks queries.
ArticleStat:
- fixed on Chrome
- kfet_config gives "reduction_cof" as editable instead of
"subvention_cof"
- this last one can still be accessed via kfet_config (computed from
new "reduction_cof"
- add units to numeric values of kfet_config form
- PermConsumerMixin allows checking permissions on connection to a
consumer.
- KPsul consumer uses this mixin to check if connecting user has the
permission `kfet.is_team`.
Fixes#67.
- Use last official releases of channels, asgiref, daphne and
asgi-redis packages.
- Customization of JsonWebsocketConsumer is now in kfet app through a
custom class (and so, doesn't require anymore a forked version of channels).
- Clean kfet consumers code.
- AccountNegative use new AccountNegativeManager which select_related
account, cofprofile and user for instances accessed via
AccountNegative.objects.
- Compute sum of negatives with python instead of an SQL statement
(since we already got the data with a previous query).
- Fix bug on account property `real_balance` (happened if
an account has a relative AccountNegative instance but balance_offset
to NULL).
- More compliant to PEP8
- When Account model is queried with Account.objects, it always add
.select_related('cofprofile_user', 'negative').
- Eg benefits: history doesn't do anymore one request by account to
fill the account filter.
Important
Using this workaround (systemically append select_related) can be
dangerous normally, however a certain number of properties in
cofprofile and user are frequently used (as firstname or lastname), and
the benefits seems greater.
createopes script:
- more than 6x faster
- only bulk_create is used instead of create or save
- correctly create editions (~5% of created operations)
- ratio of withdrawals go from ~10% to ~5%
- 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...)
- get_scale_args method of ScaleMixin retrieves useful GET params for
Scale object instanciation (by default from request.GET)
- it takes into account the type of the scale arg
- prefix used for GET param can be modified in stats_manifest funcs and
ScaleMixin
- References to `Stat` in `Scale` objects are deleted (because scales
are independent of stats)
- KFET_WAKES_UP_AT is now a time object insted of an hour
- Proper use of date, datetime, timedelta, etc (django.utils.timezone
provides neither datetime nor timedelta)
- KFetConfig `set` method now takes model instance instead of their pk
for this type of entries.
- Add tests for KFetConfig class: tests against types currently used by
kfet app (duration, modelinstance, decimal).
- These tests are located in `kfet/tests/test_config.py`. We should
separate tests suites by file like this, considering what they are about.
- KFetConfig method `set_many` renamed to `set` (because it also updates
only one).
K-Fêt - Création d'inventaires
- Amélioration de l'interface
- Ajout de colonnes intermédiaires pour faciliter le calcul
- Ajout d'indication de conflits possibles avec les opérations en cours
- Résolution semi-automatique de ces conflits
Closes#141
See merge request !200