Commit graph

1326 commits

Author SHA1 Message Date
Martin Pépin
40abe81402 Integrate the new settings workflow into vagrant 2017-04-10 23:01:19 +01:00
Martin Pépin
a5fb162aaf New organisation of settings files
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.
2017-04-10 23:01:19 +01:00
Martin Pepin
495c6ac3d1 Merge branch 'aureplop/kfet_config' into 'master'
Configuration utilisateur K-Fêt

See merge request !210
2017-04-10 21:14:37 +02:00
Aurélien Delobelle
5d6012b6bd Fix kfet tests
- and add test for `kfet_config.subvention_cof`
2017-04-10 11:52:57 +02:00
Aurélien Delobelle
c228416809 Subvention -> Réduction + units for kfet_config
- 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
2017-04-10 11:36:06 +02:00
Aurélien Delobelle
e89ff68d3b add misisng import 2017-04-09 01:39:18 +02:00
Aurélien Delobelle
457ee64004 update migrations order 2017-04-08 18:38:47 +02:00
Aurélien Delobelle
784ba9bd10 Merge branch 'master' into aureplop/kfet_config 2017-04-08 18:36:28 +02:00
Aurélien Delobelle
15861824b6 Merge branch 'Aufinal/tabs' into 'master'
K-Fêt
- Détails d'un compte: historique et stats sont accessibles par des onglets.

See merge request !218
2017-04-08 14:41:36 +02:00
Ludovic Stephan
4a6bfd5e3d Better button distinction 2017-04-07 12:58:03 -03:00
Ludovic Stephan
052e7b2b6e Move navigation to content-left 2017-04-07 12:17:36 -03:00
Ludovic Stephan
e26668e5eb Add tabs to account_read 2017-04-06 21:17:47 -03:00
Aurélien Delobelle
a0979c220b Merge branch 'bda_pep8' into 'master'
Clean the `bda.views.catalogue` view

See merge request !212
2017-04-06 21:24:18 +02:00
Ludovic Stephan
5e68fcf315 Merge branch 'aureplop/hotfix' into 'master'
Aureplop/hotfix

See merge request !214
2017-04-06 00:32:29 +02:00
Aurélien Delobelle
4b2e20e728 created_at required with default 2017-04-06 00:31:04 +02:00
Aurélien Delobelle
e2d7192b23 fix perform opes after account reset 2017-04-06 00:11:41 +02:00
Aurélien Delobelle
c849306a32 fix kfet home template 2017-04-06 00:00:53 +02:00
Martin Pépin
981759f5ce Adds tests covering the bda-catalogue JSON API 2017-04-05 21:02:00 +01:00
Martin Pépin
9ec151e040 A query optimization in bda.views.catalogue
We only need to fetch shows identifiers here:

    FOO.filter(BAR__in=shows)

which can be done using the `values_list` method
2017-04-05 20:48:18 +01:00
Martin Pépin
ff9cee5ffc line too long in bda.models 2017-04-05 20:42:50 +01:00
Martin Pépin
853a239e6e Rewrite bda.views.catalogue
- No string concatenations
- Use `get_object_or_404` instead of performing a `.get` and catching
  the eventual exception.
- More accurate error messages when a bad request is detected.
- More accurate error handling
2017-04-05 19:53:04 +01:00
Aurélien Delobelle
ebf948d042 Merge branch 'qwann/k-fet/category_addcost' into 'master'
K-Fêt - Majorations
- Seulement les catégories préalablement sélectionnées sont majorées le 
le cas échéant.
- Pour modifier cette sélection, suivre le lien "Catégories" depuis la
liste des articles.

Fixes #149

See merge request !189
2017-04-05 15:52:15 +02:00
Aurélien Delobelle
3ee9de93d9 few improvements on article category
- 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...)
2017-04-05 15:34:28 +02:00
Aurélien Delobelle
42728e58be Merge branch 'master' into qwann/k-fet/category_addcost 2017-04-05 14:57:26 +02:00
Martin Pépin
a262983170 PEP8 compliance in bda.views 2017-04-04 23:51:22 +01:00
Martin Pepin
fe66a6ef6b Merge branch 'aureplop/fix_stats' into 'master'
Stats K-Fêt - Python side

See merge request !208
2017-04-05 00:41:47 +02:00
Martin Pépin
85ba44c231 Tests the redirection using the appropriate method 2017-04-04 23:31:24 +01:00
Qwann
7350006990 PEP8 2017-04-04 21:48:17 +02:00
Qwann
ba11aa49db categories are updatable 2017-04-04 21:36:02 +02:00
Aurélien Delobelle
dc07b072ab Flatten scale args in GET params of stats urls
- 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
2017-04-04 20:12:21 +02:00
Aurélien Delobelle
885e40fd05 cleaner scales
- 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)
2017-04-04 18:11:15 +02:00
Aurélien Delobelle
ddd71c7ac1 add missing __init__ 2017-04-04 17:29:54 +02:00
Aurélien Delobelle
714903210c Add kfet_config tests
- 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).
2017-04-04 17:05:55 +02:00
Qwann
72615bf400 small fixes 2017-04-04 16:57:17 +02:00
Aurélien Delobelle
278459e80f typo....... 2017-04-04 11:05:49 +02:00
Aurélien Delobelle
0405eee7a7 Merge branch 'Aufinal/inventaires' into 'master'
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
2017-04-04 10:59:09 +02:00
Martin Pépin
b383923d49 Merge branch 'Kerl/test_stats' into aureplop/fix_stats 2017-04-04 09:39:26 +01:00
Aurélien Delobelle
7989a07b5f cleaner fix 2017-04-04 01:36:19 +02:00
Aurélien Delobelle
df467767f4 fix default GET param 'types' on operations stats 2017-04-04 01:29:19 +02:00
Martin Pépin
f13d1072c7 Add simple tests for the stat views
We check that we can get all the stats views with the appropriate
permissions.
2017-04-03 23:21:42 +01:00
Aurélien Delobelle
ce2a05766d Add set_many methods to kfet_config
- Fix addcost updates (from K-Psul)
2017-04-03 23:06:47 +02:00
Ludovic Stephan
51acb4e00a Use new WS class 2017-04-03 16:05:18 -03:00
Ludovic Stephan
32474a6865 Don't update input when unchecking 2017-04-03 16:03:22 -03:00
Ludovic Stephan
f46ba0dd6c Merge branch 'master' into Aufinal/inventaires 2017-04-03 16:01:51 -03:00
Aurélien Delobelle
7384465cbd fix migrations order 2017-04-03 21:01:36 +02:00
Aurélien Delobelle
921dce1f35 Merge branch 'master' into aureplop/kfet_config 2017-04-03 20:58:57 +02:00
Aurélien Delobelle
b3418db33d Merge branch 'Aufinal/edit_migration' into 'master'
Migrations oubliées

See merge request !209
2017-04-03 20:58:00 +02:00
Ludovic Stephan
5607d7c9a4 Migration pour kfet_forms 2017-04-03 15:54:02 -03:00
Ludovic Stephan
ad2c8537e3 Add Runpython (oops) 2017-04-03 15:50:18 -03: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