Commit Graph

138 Commits

Author SHA1 Message Date
thomas girod
d16a207a83
Add more Ruff rules (#891)
* ruff: apply rule F

* ruff: apply rule E

* ruff: apply rule SIM

* ruff: apply rule TCH

* ruff: apply rule ERA

* ruff: apply rule PLW

* ruff: apply rule FLY

* ruff: apply rule PERF

* ruff: apply rules FURB & RUF
2024-10-15 11:36:26 +02:00
imperosol
5a8052ae47 send mail to inactive users 2024-10-11 09:57:41 +02:00
imperosol
c0a6f5eb30 Optimize barmen timeout and counter state fetch
Le timeout se fait en une seule requête et la récupération de l'état des comptoirs en une seule requête aussi. Grâce à ça, on peut en grande partie retirer le cache pour l'affichage de l'état des comptoirs, ce qui a des implications excellentes en termes d'UX (comme le fait que la redirection vers la page de comptoir ou d'activité aura plus une apparence de truc aléatoire)
2024-10-10 19:38:49 +02:00
imperosol
4bc4d266c2 Remove the question mark from the counter state
En raison de la manière dont le timeout marche et de l'activité des comptoirs, la notion de "comptoir inactif" n'est pas intuitive. Un comptoir est ouvert ou fermé. Point.
2024-10-10 19:37:00 +02:00
imperosol
58d3a7ee2c Optimize user account pages 2024-10-04 13:41:39 +02:00
thomas girod
a4fe4996aa
Merge pull request #834 from ae-utbm/real-name
Restore real name
2024-10-03 10:12:23 +02:00
Sli
655d72a2b1 Completely integrate wepack in django
* Migrate alpine
* Migrate jquery and jquery-ui
* Migrate shorten
* Add babel for javascript
* Introduce staticfiles django app
* Only bundle -index.js files in static/webpack
* Unify scss and webpack generated files
* Convert scss calls to static
* Add --clear-generated option to collectstatic
* Fix docs warnings
2024-10-02 16:11:02 +02:00
thomas girod
d29a5cdb44 Add the new 3DSv2 fields 2024-09-27 11:10:38 +02:00
Sli
9c93162741 Add missing files 2024-09-23 10:25:27 +02:00
Sli
6068c6048a Use real name of the website once again 2024-09-23 01:37:25 +02:00
thomas girod
79ef151ad3 auto compress product icons 2024-09-15 14:12:41 +02:00
thomas girod
6962b39fc9 use typing.Self for custom queryset methods 2024-09-02 01:03:46 +02:00
thomas girod
cca9732925 eboutic big refactor 2024-08-06 16:49:20 +02:00
thomas girod
82d3791859 refactor counter 2024-07-21 10:51:08 +02:00
thomas girod
8c69a94488 use google convention for docstrings 2024-07-21 00:57:04 +02:00
thomas girod
2ac578c3ad ruff rule DJ
Co-authored-by: Bartuccio Antoine <klmp200@users.noreply.github.com>
2024-07-08 15:37:10 +02:00
thomas girod
171a1cb876 ruff rule FBT 2024-07-08 15:37:09 +02:00
thomas girod
cfc19434d0 ruff rules UP008 and UP009 2024-07-08 15:37:09 +02:00
thomas girod
aa07fa9207 faster tests 2024-07-04 14:03:19 +02:00
thomas girod
cd58d5a357 resolve warnings 2024-07-04 11:31:35 +02:00
thomas girod
ae1fcdb8c0 fix: CashRegisterSummaryItem.check overriding a django method 2024-07-04 11:20:24 +02:00
thomas girod
3143d3d91a reorganize imports with ruff 2024-06-26 12:35:38 +02:00
Julien Constant
38295e591d
Fix immutable default variable in get_start_of_semester (#656)
Le serveur ne percevait pas le changement de semestre, parce
que la valeur par défaut passée à la fonction `get_start_of_semester()` était une fonction appelée une seule fois, lors du lancement du serveur. Bref, c'était ça : https://beta.ruff.rs/docs/rules/function-call-in-default-argument/

---------

Co-authored-by: imperosol <thgirod@hotmail.com>
2023-09-07 23:11:58 +02:00
thomas girod
ef968f3673
Better usage of cache for groups and clubs related operations (#634)
* Better usage of cache for group retrieval

* Cache clearing on object deletion or update

* replace signals by save and delete override

* add is_anonymous check in is_owned_by

Add in many is_owned_by(self, user) methods that user is not anonymous. Since many of those functions do db queries, this should reduce a little bit the load of the db.

* Stricter usage of User.is_in_group

Constrain the parameters that can be passed to the function to make sure only a str or an int can be used. Also force to explicitly specify if the group id or the group name is used.

* write test and correct bugs

* remove forgotten populate commands

* Correct test
2023-05-02 12:36:59 +02:00
Julien Constant
8e7c025e47
[FIX] Broken link in readme and license fix (& update) (#591) 2023-04-04 18:39:45 +02:00
thomas girod
6c1fa6de0b
remove-useless-queries-counter-stats (#519) 2023-03-24 15:32:05 +01:00
thomas girod
a73fe598ef
repair user merging tool (#498) 2023-03-04 15:01:08 +01:00
thomas girod
394e17d599
resolved importError (#565) 2023-01-13 02:22:53 +01:00
thomas girod
59136850b8
Merge pull request #530 from ae-utbm/redirection_for_barmen
redirect the user directly on counter when barman
2023-01-11 23:24:45 +01:00
thomas girod
d726f4b1e8
Merge pull request #499 from ae-utbm/unify-account-creation
Unify account id creation
2023-01-11 13:26:00 +01:00
thomas girod
705b9b1e6a
Passage de vue à Alpine pour les comptoirs (#561)
Vue, c'est cool, mais avec Django c'est un peu chiant à utiliser. Alpine a l'avantage d'être plus léger et d'avoir une syntaxe qui ne ressemble pas à celle de Jinja (ce qui évite d'avoir à mettre des {% raw %} partout).
2023-01-10 22:26:46 +01:00
Thomas Girod
31e8ad8a3e redirect directly on counter if user is barman 2023-01-10 17:37:26 +01:00
Thomas Girod
751c8a8bc6 unify account_id creation 2023-01-09 21:40:38 +01:00
Théo DURR
4fe46fbcef
[FIX] 3DSv2 - Echappement du XML et modif tables (#543)
* Fixed wrong HMAC signature generation
* Updated migration files

Co-authored-by: Julien Constant <julienconstant190@gmail.com>
2023-01-09 17:46:34 +01:00
Théo DURR
fe8b8f46aa
Fix 3DSv2 implementation (#542)
* Fixed wrong HMAC signature generation

* Fix xml du panier

Co-authored-by: Julien Constant <julienconstant190@gmail.com>
2023-01-06 20:02:45 +01:00
Thomas Girod
ceb2888f82 enhance admin pages 2022-12-19 20:55:33 +01:00
thomas girod
1d82e2a7d9
Change country id to ISO 3166 1 numeric for 3DSV2 (#510) 2022-12-12 22:54:31 +01:00
thomas girod
b8a72c57e1
escape html characters on xml (#505) 2022-12-10 20:41:35 +01:00
Thomas Girod
fe9e5ce861 integration of 3D secure v2 for eboutic bank payment 2022-11-30 22:52:56 +01:00
Thomas Girod
60eff1000f second patch on eboutic 2022-11-16 20:41:24 +01:00
Thomas Girod
8b09ba2924 refonte de la boutique en ligne 2022-10-30 12:33:21 +01:00
Sli
98bfc308a7 Minimal working version
* Upgrade dependencies
* Fix ugettext
* Fix bad urls
2022-08-04 00:28:09 +02:00
Alexandre | L'Sacienne
454ae5f9e3 Add authorization to refill to the counters AE & BdF 2022-05-22 09:56:53 +00:00
lsacienne
f2666f6fb0
Replace the query by a function which already
existed
2022-05-02 00:04:00 +02:00
lsacienne
bbf362691b
Change to use settings instead of hardcoding 2022-04-27 15:38:55 +02:00
lsacienne
c6caf5dbce
Add of restriction for refilling 2022-04-20 14:01:33 +02:00
f34f5fe693
Upgrade black and format accordingly 2020-08-27 15:59:42 +02:00
566dcc7aee
counter: fix Selling view permission 2019-10-17 11:24:52 +02:00
241650c171
counter: fix eticket server crash induced by old permission system and fix Selling permission 2019-10-16 21:21:51 +02:00
Cyl
aac4e3b99c Minor fix for requestGala 2019-10-14 00:32:11 +02:00