Commit graph

1714 commits

Author SHA1 Message Date
Martin Pépin
8b905f66dc Remove dependencies of an old version of dal
Django-autocomplete-light does not support the `modelform_factory`
anymore in recent versions. We are actually using an old version of dal
because of this.

This had to be dropped at some point… So now is a good time
2017-02-23 01:57:50 +01:00
Martin Pépin
e1bab7e4ed Use the AppConfig class 2017-02-23 01:56:59 +01:00
Martin Pépin
68c0ff559d Drop Grappelli
It's ugly and does not really improve the admin site
2017-02-23 01:55:43 +01:00
Martin Pépin
2dcc17298a Use Django 1.11 (beta 1)
Starting to use Django 1.11.
The final version will be released before we push this to production.
2017-02-23 01:55:26 +01:00
Martin Pépin
1aed36330f Write modern-style urls
- Proper use of include
- Defining namespaces (I do not use them for now because many urls are
  going to change)
- Do not try to reverse with old-style references: 'cof.views.XXX'
2017-02-23 01:52:55 +01:00
Martin Pépin
9f401b66e9 Specify the on_delete attribute everywhere
- Models
- Migrations
2017-02-23 01:40:25 +01:00
Martin Pépin
c81b849785 Prevent conflicts in COF perm migration
There may be a conflict during the migration cof 0009 if the permissions
are referenced only by their codename.
2017-02-22 18:21:23 +01:00
Martin Pépin
d36d69238d Add groups and permissions for BDS staff & members 2017-02-22 18:19:49 +01:00
Martin Pépin
f8a8465630 Remove useless imports 2017-02-22 15:23:37 +01:00
Martin Pépin
5632cdaa22 Uses the cof_members groups in kfet's autocomplete
The is_cof attribute cannot be used in database queries anymore
2017-02-22 15:03:34 +01:00
Martin Pépin
68b38228a9 Apply the new db structure to autocomplete in cof
- The autocompletion feature works again
- The template is a bit more readable (indentation)
- The `options` variable in the template is no longer a integer but a
  boolean.
2017-02-22 14:49:34 +01:00
Martin Pepin
a0a7be43e1 Merge branch 'Aufinal/fix_revente' into 'master'
Répare les boutons de transfert/réinitialisation de revente. Le problème
était dû à une mauvaise conversion `str` -> `int` de l'id de la revente 
et l'utilisation d'un formulaire Django élimine ce problème.

fixes #122

See merge request !172
2017-02-22 14:08:00 +01:00
Ludovic Stephan
42a93027d3 fix pep8 + move template 2017-02-21 19:49:29 -03:00
Martin Pépin
1f85f75896 Include the Clubs into the admin site 2017-02-20 01:16:50 +01:00
Martin Pépin
669129e30d Move the club model to the gestion app
- Move the model
- Add some BDS-related fields
- Add an `associations` fields to be able to separate the clubs between
  the different associations using groups
2017-02-20 01:12:06 +01:00
Martin Pépin
859f191894 Simpler admin interface 2017-02-18 19:06:43 +01:00
Martin Pépin
52bdd9824a Merge branch 'supportBDS' of git.eleves.ens.fr:michele.orru/gestioCOF into michele 2017-02-18 13:00:21 +01:00
Ludovic Stephan
d96f4ead87 Revert "remove immediate mail"
This reverts commit 8953d3de07.
2017-02-16 09:55:19 -02:00
Ludovic Stephan
8953d3de07 remove immediate mail 2017-02-16 09:22:15 -02:00
Ludovic Stephan
d524d9286f better annulation check 2017-02-16 02:28:57 -02:00
Ludovic Stephan
d9402e1059 change resell and reinit forms 2017-02-16 01:52:44 -02:00
Evarin
ddbcfe0c69 JS commenté et plus propre 2017-02-15 22:25:26 +01:00
Evarin
0fcb29252b Frontend tout en JS 2017-02-15 21:01:54 +01:00
Qwann
46f343b1ab la K-Fêt se réveille à 7h 2017-02-15 14:44:58 +01:00
Qwann
1c90608f6d some cleaning 2017-02-15 14:21:00 +01:00
Martin Pépin
451fddaff0 Fix CI script
Finally, the old test database is destroyed before the build which
is simpler and makes more sense.
2017-02-13 17:43:10 +01:00
Martin Pépin
e8d21882fb Fix CI config
cleanup is not a stage by default, it has to be specified
2017-02-13 17:33:35 +01:00
Martin Pépin
85e593ddb8 Removes the test database if the build fails
Sometime the test database is not destroyed because the build is
interrupted by an uncaught error. This causes an error during the next
build.
2017-02-13 17:27:27 +01:00
Aurélien Delobelle
ef864cec32 Merge branch 'Aufinal/visibilite_stock' into 'k-fet'
K-Psul

Articles
- Ajout d'une surbrillance pour les articles dont le stock est bas
  (entre -5 et 5)

Panier
- Ajout d'indications de stocks sur chaque ligne (stock, warning visuel)
- Les ajouts/retraits d'articles déjà dans le panier mettent à jour la
  ligne associée à celui-ci déjà existante
- Les flèches haut/bas permettent de modifier la quantité d'un article

Fix #111

See merge request !133
2017-02-13 16:42:22 +01:00
Aurélien Delobelle
2e8fc45a1b Merge branch 'Aufinal/own_password' into 'k-fet'
Changement de son propre mot de passe

Permet à un K-Fêteux (disposant de la permission `kfet.is_team`) de modifier son propre mot de passe sur la page `account/XXX/edit`.

Accessoirement, la fonction `account_update` est maintenant conforme à PEP8.

Fix #121

See merge request !148
2017-02-13 16:32:40 +01:00
Ludovic Stephan
46e9e82da8 move account save 2017-02-13 12:19:47 -02:00
Qwann
9cae3ad0bd Merge branch 'k-fet' into qwann/k-fet/stats 2017-02-13 14:37:29 +01:00
Ludovic Stephan
83e41c292e css tweaks 2017-02-13 11:34:47 -02:00
Ludovic Stephan
43aab26530 Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/visibilite_stock 2017-02-13 10:51:24 -02:00
Martin Pépin
d7a13229ad Fix CI config
- The setting file has moved to `gestioCOF/`
2017-02-13 13:41:34 +01:00
Aurélien Delobelle
1a684471c2 Merge branch 'Aufinal/fix_amounts' into 'k-fet'
K-Psul:
- fix #163: different rounding for UKF accounts balances / UKF articles prices

See merge request !171
2017-02-13 08:25:13 +01:00
Ludovic Stephan
3fa0e4de6c different rounding for accounts 2017-02-12 19:05:41 -02:00
Ludovic Stephan
3dfd8bf616 interface for order_to_inventory 2017-02-12 18:04:50 -02:00
Martin Pépin
7f5132961f Add the cof_members group
GestioCOF cannot run without it.
There is no permission associated to it: this has to been thought about
2017-02-12 19:49:30 +01:00
Martin Pépin
659c6e720a Merge branch 'master' into supportBDS 2017-02-12 19:36:17 +01:00
Martin Pépin
e1a8c0e8dd Add missing files 2017-02-12 19:21:53 +01:00
Martin Pépin
1d7499d3b2 simplify profile edition and test it 2017-02-12 19:21:53 +01:00
Martin Pépin
f5b23174de Fix test_database issue in bootstrap
The test database shouldn't be created manually
2017-02-12 17:39:30 +01:00
Martin Pépin
266a789d97 Merge branch 'Kerl/messages'
- Utilise une version à jour de jquery via un cdn
- Traite les messages
- Remplace les vieux simili-messages par des messages en utilisant le
  framework messages de Django
2017-02-12 16:47:44 +01:00
Martin Pépin
0420839b20 Test the authentication
- An "outsider" must use django's authentication backend
- A user with a login_clipper should use CAS
2017-02-12 15:38:20 +01:00
Martin Pépin
8b620a5319 PEP8 in gestion/tests.py 2017-02-12 15:38:20 +01:00
Martin Pépin
a28c00e474 Move the auth stuff to gestion/
- The login views are in `gestion/`
- The templates are under `gestion/templates/gestion/`
- `cof/shared.py` moves to `gestion/` and is splitted into 3 files:
    - The auth backends are in `backends.py`.
    - The context_processor is in `context_processor.py`
    - The LOCK/UNLOCK functions remain in `shared.py`
2017-02-12 15:38:14 +01:00
Ludovic Stephan
031b992fa3 fix brackets & lowstock indication 2017-02-12 11:09:03 -02:00
Ludovic Stephan
99d04fb75e bugfix 2017-02-12 11:02:54 -02:00
Aurélien Delobelle
4a5d9f880a Merge branch 'Aufinal/fix_amounts' into 'k-fet'
Corrige l'affichage du prix

!124 était overkill ; `amountToUKF` peut prendre en argument des valeurs positives ou négatives, et il me semble que le `round` ne sert quà corriger les erreurs de `float`, ce qui conduit à #128. Du coup, on revert une partie.

fixes #128

See merge request !163
2017-02-12 05:09:30 +01:00