Commit graph

48 commits

Author SHA1 Message Date
Aurélien Delobelle 07f1a53532 CMS permissions can be managed from group views.
These permissions concern pages, images, documents and access to the
wagtail admin site. Only appropriate elements can be selected: only the
kfet root page and its descendants, same for the kfet root collection
(for images and documents), and kfet snippets (MemberTeam).

Add django-formset-js as dependency to help manipulate formsets.

K-Fêt groups created from "devdata" commands get suitable permissions
for the CMS.
2017-10-17 16:50:39 +02:00
Martin Pépin 522acafb2e Add python dependency for Debian9 2017-08-10 16:56:20 +01:00
Martin Pépin ad15c45237 Switch to nginx + postgres in vagrant 2017-08-09 22:18:26 +01:00
Aurélien Delobelle 455b730cc3 Merge branch 'master' into aureplop/kfet_cms 2017-06-23 02:53:05 +02:00
Aurélien Delobelle b8110c11a4 kfet.open
kfet.open app
- Base data (raw_open, last_update...) is stored and shared through cache system.
- 2 websockets groups: one for team users, one for other users.
- UI is initialized and kept up-to-date with WS.
- raw_open and force_close can be updated with standard HTTP requests.
  At this time, there isn't any restriction on raw_open view. Common sense tell us
  to change this behavior.

Misc
- Clean channels routing.
- 'PermConsumerMixin': user who sent the message is available as argument in
connection_groups method, which returns groups to which the user should be
appended on websocket connection (and discarded on disconnection).
- New kfet.utils module: should be used for mixins, whatever is useful and not concerns
the kfet app.
- Clean JS dependencies.
2017-06-21 07:08:28 +02:00
Aurélien Delobelle 8c6d56b27c Add Wagtail CMS for kfet app.
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.
2017-05-30 20:44:30 +02:00
Aurélien Delobelle e772d12721 Merge branch 'master' into aureplop/fix_cache 2017-04-15 14:27:20 +02:00
Aurélien Delobelle b357283f87 Merge branch 'master' into aureplop/clean_channels 2017-04-11 00:32:07 +02:00
Aurélien Delobelle 2a3c892d39 Merge branch 'master' into aureplop/fix_cache 2017-04-10 21:39:54 +02:00
Aurélien Delobelle 36771c2c4f Use redis for cache.
- 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
2017-04-10 21:36:00 +02:00
Aurélien Delobelle 2c40838938 Add real cache support
- Fix cache per process issue with a real cache system
- Configuration seems too easy... but it seems to work
2017-04-10 19:47:00 +02:00
Aurélien Delobelle 1e18c4043e Use last channels & co versions
- 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.
2017-04-09 15:47:16 +02:00
Aurélien Delobelle 784ba9bd10 Merge branch 'master' into aureplop/kfet_config 2017-04-08 18:36:28 +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 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
Martin Pépin 6e55905781 Merge branch 'master' into Kerl/use_django_custommail 2017-02-11 03:20:29 +01:00
Martin Pépin 540b6f38b8 Merge branch 'master' into Kerl/ldap 2017-01-09 15:47:12 +01:00
Aurélien Delobelle b6bd08170e fix pip warning 2017-01-07 03:47:10 +01:00
Martin Pépin 3c7558c853 The end of Clipper
GestioCOF fetches the clipper accounts from an LDAP database and doesn't
need to store clippers in a table anymore.
2016-12-25 11:57:50 +01:00
Martin Pépin fe8f18ff78 Utilise django_custommail
- On installe le package depuis le dépôt COF-Geek
- On supprime tous les fichiers texte des mails
- On charge dans la bdd les mails nécessaires au fonctionnement de
  GestioCOF
- On supprime le modèle CustomMail obsolète de gestioncof
2016-12-22 03:45:03 +01:00
Basile Clement 3c362014b0 Remplace simplejson par json de la bibliothèque standard 2016-11-13 15:04:47 +01:00
Martin Pépin b40fc6204f Changements mineurs
- Suppression de la variable `ALLOWED_HOSTS` de `cof/settings.dev` de
sorte quand django utilise le default (qui est adapté à notre usage)
- Correction d'indentation
- Suppression d'un "-e" dans le fichier `requirements.txt`
2016-11-05 22:01:38 +01:00
Martin Pepin 68b85adc81 Merge branch 'Elarnon/revente-mail-losers' into 'master'
[bda-revente] Envoie un mails aux perdants d'un tirage de revente

Note : Le changement dans le `requirements.txt` permet de profiter des mises à jour "patch" de django (qui contiennent notamment des mises à jour de sécurité...), ce qui permet d'éviter un bug corrigé dans la version 1.8.1 avec l'utilisation de `|floatformat` avec `django.template.loader.render_to_string`.

See merge request !106
2016-11-05 21:55:23 +01:00
Basile Clement ba2d90d906 [bda-revente] Envoie un mails aux perdants d'un tirage de revente 2016-11-05 20:04:25 +01:00
Basile Clement 34032c9a00 Utilise une version officielle de django-cas-ng
Le fix de Xapantu pour la double authentification a été intégré à la
version 3.5.5 de django-cas-ng.
2016-11-05 18:26:34 +01:00
Martin Pépin 05e48386a1 Ajustements, fix 2016-09-24 18:44:35 +02:00
Aurélien Delobelle 9236ab0a77 ajout django-widget-tweaks 2016-09-03 16:29:32 +02:00
Aurélien Delobelle 9b5aeee83e Oubli compat Py2 req 2016-09-01 00:52:34 +02:00
Aurélien Delobelle 50ed08dd72 Utilisation d'un fork du package 'channels'
Qui utilise DjangoJSONEncoder pour les group_send (json.dumps basique
n'encode pas les Decimal)
2016-08-20 15:30:33 +02:00
Aurélien Delobelle 09499886a8 fix requirements 2016-08-18 14:31:36 +02:00
Aurélien Delobelle b87b0ce958 Install redis-server et fix requirements 2016-08-18 14:23:27 +02:00
Aurélien Delobelle 8256c96ffb K-Psul - Historique + synchronisation
- Ajoute l'affichage de l'historique dans K-Psul
- Ajoute la synchronisation du montant des caisses et de l'historique
  entre les interfaces K-Psul ouvertes par le package 'channels' et
  l'utilisation de websockets
- Corrige l'obligation de l'article sur K-Psul (pas d'article pour les
  charges et retraits)
- Corrige type renvoyé par perms_to_perform_operations
- Rangement de js.cookie.js dans static/kfet/js/
- Ajout de dépendances
2016-08-14 19:59:36 +02:00
Aurélien Delobelle 43d938edd0 initial 2016-08-02 10:40:46 +02:00
Martin Pépin 7020d6a646 Merge branch 'master' into Kerl/deprec 2016-07-30 00:27:59 +02:00
Martin Pépin 2632c9dff8 Merge branch 'master' into Kerl/calendar 2016-07-29 20:17:04 +02:00
Qwann 692b2917c9 ajout de django-bootstrap-form 2016-07-27 15:44:10 +02:00
Martin Pépin 6732c65c33 Mise à jour des requirements 2016-07-18 19:52:55 +02:00
Martin Pépin 8af49a1020 Ajout d'un calendrier dynamique
Ce patch propose aux adhérents du COF de télécharger un calendrier
dynamique (`.ics`).

Il est configurable :
    - On peut s'abonner ou non aux événements du COF.
    - On peut choisir les spectacles auxquels on veut s'abonner.
2016-07-15 01:06:33 +02:00
Qwann eacce30900 avec le bon requierement c'est mieux 2016-07-12 00:43:16 +02:00
Qwann e92295ee12 home fini, début du reste 2016-07-11 21:48:11 +02:00
Basile Clement 2b7f1c96d1 Bump grappelli version (rubber-stamped by Kerl)
This should remove the RemovedInDjango19 warning.
2016-06-07 23:39:32 +02:00
Martin Pepin d77dfbde03 Merge branch 'Elarnon/mysqlclient' into 'master'
Remplace MySQLdb par mysqlclient

mysqlclient est maintenant le client MySQL recommandé par Django
(https://docs.djangoproject.com/en/1.9/ref/databases/#mysql-db-api-drivers),
et il a l'avantage d'être compatible avec Python 3, contrairement à
MySQLdb.

See merge request !19
2016-06-04 13:54:01 +02:00
Basile Clement 4d48dde965 Utilise unicodecsv de PyPy
GestioCOF utilisait une implémentation locale du module `csv` compatible
avec `unicode`. Il existe un module PyPy du même nom qui fait la même
chose, autant l'utiliser (par ailleurs, il fonctionne plus sainement
avec Python 3).
2016-06-03 21:15:30 +02:00
Basile Clement ca428d519d Remplace MySQLdb par mysqlclient
mysqlclient est maintenant le client MySQL recommandé par Django
(https://docs.djangoproject.com/en/1.9/ref/databases/#mysql-db-api-drivers),
et il a l'avantage d'être compatible avec Python 3, contrairement à
MySQLdb.
2016-06-03 21:15:05 +02:00
Martin Pépin 8f05489c5d Merge branch 'Elarnon/django_cas_ng' 2016-06-03 12:32:10 +02:00
Basile Clement 21641c9468 Migration vers django_cas_ng
Précédemment, GestioCOF utilisait django-cas, qui n'est plus maintenu.
Ceci le remplace par django-cas-ng, un fork plus récent et maintenu.

En particulier, django-cas-ng est compatible avec Python 3,
contrairement à django-cas.
2016-06-03 01:19:37 +02:00
Basile Clement 01891bfd6c Enlève eav-django qui n'est plus utilisé
Fixes #5.
2016-06-03 01:17:44 +02:00
Basile Clement ce06e68b47 Update requirements.txt 2016-05-24 00:53:29 +02:00