Commit graph

1820 commits

Author SHA1 Message Date
Ludovic Stephan 31b742fdb7 Move ws update to respective classes 2017-05-14 17:19:09 -03:00
Martin Pepin 5d8427e601 Merge branch 'aureplop/fewer_requests' into 'master'
Moins de requêtes

See merge request !217
2017-05-12 21:13:35 +02:00
Aurélien Delobelle 4ac7b30bdd Fix UserGroupForm + tests for this form.
- 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
2017-05-12 16:55:18 +02:00
Aurélien Delobelle b1e46792c8 (little) cleaning of order_create view 2017-05-10 13:11:47 +02:00
Aurélien Delobelle b0e7ebfbc5 fix typo + pep8 + del future imports 2017-05-10 12:49:14 +02:00
Aurélien Delobelle 6cdb791989 fix class name conflicts 2017-05-10 12:39:56 +02:00
Aurélien Delobelle e7266e7a9d use new settings for redis 2017-04-26 11:28:18 +02:00
Aurélien Delobelle 673dc0295d Merge branch 'master' into aureplop/fix_cache 2017-04-26 11:22:29 +02:00
Aurélien Delobelle 4ed5128829 Merge branch 'Kerl/settings2' into 'master'
Add settings for redis and fix settings handling in the provisioning script

See merge request !227
2017-04-26 11:19:44 +02:00
Martin Pépin fb4258f821 Set the redis passwd properly in bootstrap.sh 2017-04-25 20:23:51 +01:00
Martin Pépin dbff7740c8 Add REDIS_PORT to the settings and secrets 2017-04-25 20:23:21 +01:00
Ludovic Stephan 5c5fc6da1b Merge branch 'aureplop/less_prices_history' into 'master'
Less articles prices history

Closes #142

See merge request !224
2017-04-25 14:32:18 +02:00
Martin Pépin 52d9979d7c Fix settings in the provisioning script 2017-04-24 22:17:41 +01:00
Martin Pépin 2aee43e01a Add more configuration options for redis
- `REDIS_HOST` can be specified in the secrets
- Two new secrets: `REDIS_PASSWD` and `REDIS_DB`
2017-04-24 22:17:41 +01:00
Ludovic Stephan 8b8a3f8a25 Update button in history 2017-04-24 14:46:16 -03:00
Ludovic Stephan 16dbfed977 Add chidren div in display 2017-04-24 14:12:03 -03:00
Ludovic Stephan 5096e5f129 Adapt ArticleManager 2017-04-24 13:25:18 -03:00
Ludovic Stephan 46ac82fd27 Adapt history to changes 2017-04-24 13:25:07 -03:00
Ludovic Stephan e283439ebc Create ForestDisplay class
- Store templates, container and data
- All display functions removed from ModelForest
2017-04-24 13:21:56 -03:00
Ludovic Stephan 20d635137c Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_history 2017-04-24 11:30:01 -03:00
Aurélien Delobelle 739990cdb6 Add total boxes to new inventory view + fix/clean
- 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.
2017-04-22 01:17:23 +02:00
Aurélien Delobelle 6de0844d28 Merge branch 'master' into aureplop/clean_scroll 2017-04-21 22:28:22 +02:00
Aurélien Delobelle 0d8a613f28 improve bda inscription form/view code 2017-04-21 18:22:53 +02:00
Aurélien Delobelle 2eee8f58aa Merge branch 'master' into aureplop/fewer_requests 2017-04-17 20:45:01 +02:00
Aurélien Delobelle 8622002e8d minor change 2017-04-17 20:40:54 +02:00
Aurélien Delobelle dbf5844f6a Clean settings redis 2017-04-15 14:41:55 +02:00
Aurélien Delobelle e772d12721 Merge branch 'master' into aureplop/fix_cache 2017-04-15 14:27:20 +02:00
Aurélien Delobelle a0fe94e2f4 Merge branch 'Kerl/settings' into 'master'
New organisation of settings files
- 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)
- secret.py: some settings like the SECRET_KEY or the database's credentials are loaded from an untracked file called secret.py in the same directory. This secrets are loaded by the common settings file.


See merge request !222
2017-04-15 14:25:47 +02:00
Aurélien Delobelle ce23eece6a Fix display on small screen devices.
- Remove useless margin on small screens.
- Better pills display on small screens.
- Revert to transparent background for section title.
2017-04-15 13:03:01 +02:00
Aurélien Delobelle ea81ab7b25 Few display improvements.
- 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.
2017-04-15 12:36:11 +02:00
Martin Pépin ff73a635f8 Minor fixes in settings/
- Typo
- Removes old comments
- Moves the template debug context processor back to the common file: it
  won't be loaded anyway if `DEBUG=False`.
- Ddt's middleware should be loaded first
2017-04-15 11:09:16 +01:00
Ludovic Stephan b2a5dfd682 Move permission check 2017-04-14 12:51:58 -03:00
Ludovic Stephan 100686457b Change select_related for future compatibility 2017-04-14 12:47:15 -03:00
Ludovic Stephan b544d6c5b3 Better alignment 2017-04-14 12:45:38 -03:00
Ludovic Stephan 659b20891e Add filter to cancel_opes 2017-04-14 12:43:59 -03:00
Ludovic Stephan 034a661444 Tweaks on kfet.js 2017-04-14 12:12:43 -03:00
Ludovic Stephan de865c61aa Move container clearing 2017-04-14 11:36:52 -03:00
Aurélien Delobelle b0d35667b3 Merge branch 'master' into aureplop/kpsul_js_refactor 2017-04-14 15:56:44 +02:00
Aurélien Delobelle 0a21858b33 Use css for scroll positionning
- Better rendering on scroll on pages with a left block
(- It removes the warning on Firefox about scroll positionning)
2017-04-14 13:08:03 +02:00
Ludovic Stephan 55b509b3dd Merge branch 'aureplop/fix_negative' into 'master'
Check negative on cancellation.

Closes #156

See merge request !223
2017-04-13 18:20:24 +02:00
Aurélien Delobelle 7db497d095 Less articles prices history
- Prices given with order_to_inventory are saved to db only if they are
  updated (it doesn't create a new price row each time)

Fixes #142.
2017-04-13 16:34:29 +02:00
Aurélien Delobelle 9668f1d1ec Account: check_negative() -> update_negative() 2017-04-13 15:48:13 +02:00
Aurélien Delobelle 18425b82c2 Check negative on cancellation.
- 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.
2017-04-13 15:15:59 +02:00
Aurélien Delobelle 06572f0bb5 Order create use Scale.
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.
2017-04-13 14:11:44 +02:00
Aurélien Delobelle 3f4a1adbb9 Fewer queries on stats/scales + Fix
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
2017-04-12 18:03:31 +02:00
Aurélien Delobelle e97e0081d7 Fewer queries on stats of an account balance.
- Remove labels, should be replaced to an anchor to the relative
  operation in history.
- Add select_related as necessary.
2017-04-11 23:13:54 +02:00
Aurélien Delobelle b5cc26bb1b Merge branch 'master' into aureplop/fewer_requests 2017-04-11 22:46:18 +02:00
Martin Pepin a725f8020c Merge branch 'aureplop/clean_channels' into 'master'
Aureplop/clean channels

Closes #67

See merge request !220
2017-04-11 00:42:08 +02:00
Aurélien Delobelle b357283f87 Merge branch 'master' into aureplop/clean_channels 2017-04-11 00:32:07 +02:00
Martin Pépin 40abe81402 Integrate the new settings workflow into vagrant 2017-04-10 23:01:19 +01:00