- 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
We reproduce what has been done here:
https://github.com/dissemin/dissemin
The following files can be found under `cof/settings/`
- `common.py`: the settings that are shared by all the environments we
have + the secrets (see below).
- `dev.py`: the settings used by the vagrant VM for local development.
- `prod.py`: the production settings (for both www.cof.ens.fr and
dev.cof.ens.fr)
There is also a notion of "secrets". Some settings like the `SECRET_KEY`
or the database's credentials are loaded from an untracked files called
`secret.py` in the same directory. This secrets are loaded by the common
settings file.
- Cache use db #1 of redis.
- Channel layer (of channels) use db #0 of redis.
- `settings` try getting redis connection variables from environment.
- Drop memcached system
- 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.
- Fewer requests on choicesreventes and tabular inlines (of
attributions)
- User and tirage cannot be updated if updating a participant instance.
- Tabular inlines are fixed:
- the one which is used for spectacles with listing only propose
choices in spectacle with listing
- same with the other (spectacles without listing)
- Still does too much request (because of tabularinlines)
- New attribution form issue less queries
- Spectacle and Participant are readonly if updating an attribution.
ReadOnlyMixin allows to set readonly fields only while updating an
object.