Commit Graph

301 Commits

Author SHA1 Message Date
thomas girod
6962b39fc9 use typing.Self for custom queryset methods 2024-09-02 01:03:46 +02:00
thomas girod
ff088009d9 move static files in their respective application 2024-08-26 22:34:31 +02:00
thomas girod
28ff7f24c5
Merge pull request #774 from ae-utbm/fix-operation-logs
Fix operation logs
2024-08-10 10:33:39 +02:00
Sli
20e8854467 Fix operation logs 2024-08-09 17:35:26 +02:00
thomas girod
cca9732925 eboutic big refactor 2024-08-06 16:49:20 +02:00
thomas girod
28d6d8ba96
Merge pull request #766 from ae-utbm/alpine
Alpine
2024-08-06 10:43:08 +02:00
thomas girod
29bb0f6712 promote AlpineJS to global dependency 2024-08-05 17:08:30 +02:00
thomas girod
f6fbad8403 fix missing HTTP_REFERER 2024-08-05 15:53:41 +02:00
thomas girod
a637742bb0 apply review comment 2024-08-05 10:52:15 +02:00
thomas girod
a9f66e2cd9 extract sent_from_logged_counter(request) 2024-08-05 10:52:15 +02:00
thomas girod
19fdaf4c89 fix club counter click 2024-08-01 17:50:43 +02:00
thomas girod
eef15e05f4 use autocomplete_fields in admin 2024-08-01 11:27:54 +02:00
thomas girod
b25805e0a1 introduce djhtml as jinja+scss formater 2024-07-25 16:46:45 +02:00
Sli
15f51fb03f Create an NFC button for browser supporting NFC API 2024-07-25 07:18:39 +02:00
thomas girod
04e7f65e8e
Merge pull request #725 from ae-utbm/drop-jquery-calendar
Remove jquery datetimepicker
2024-07-25 01:20:41 +02:00
Sli
fee7ade1a5 Harmonize test names 2024-07-24 00:50:48 +02:00
thomas girod
d51dbf8a53
Merge pull request #724 from ae-utbm/ninja
Use django-ninja for the API
2024-07-24 00:48:08 +02:00
thomas girod
9295325d21 remove jquery datetime picker 2024-07-23 23:26:48 +02:00
thomas girod
3046438cb1 replace drf by django-ninja 2024-07-23 19:57:33 +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
e5a2236d72 remove pytz 2024-07-18 17:33:14 +02:00
thomas girod
c6d2ac9100 ruff rule B 2024-07-08 15:37:10 +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
d97602e60b
Use pytest for tests (#681)
* use pytest for tests

Eh ouais, il y a que la config qui change. Pytest est implémentable par étapes. Et ça c'est beau.

* rework tests with pytest

* remove unittest custom TestRunner

* Edit doc and CI
2024-06-26 19:10:24 +02:00
thomas girod
3143d3d91a reorganize imports with ruff 2024-06-26 12:35:38 +02:00
thomas girod
9bdf3fc4ac use ruff for formating
Co-authored-by: Bartuccio Antoine <klmp200@users.noreply.github.com>
2024-06-26 12:35:14 +02:00
Julien Constant
d16bf12611
Links update & translations typos fixes (#671)
* Remove BDF link (as BDF is now part of AE)

* Remove unused pages

* Fix typos

* Fix typo again
2023-10-10 15:29:02 +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
Julien Constant
b30ee0a27a
[FIX] Correction de bugs (#617)
* Fix #600

* Fix #602

* Fixes & améliorations du nouveau CSS (#616)

* Fix #604

* should fix #605

* Fix #608

* Update core/views/site.py

Co-Authored-By: thomas girod <56346771+imperosol@users.noreply.github.com>

* Added back the permission denied

* Should fix #609

* Fix failing test when 2 user are merged

* Should fix #610

* Should fix #627

* Should fix #109

Block les URLs suivantes lorsque le fichier se trouve dans le dir `profiles` ou `SAS` :
- `/file/<id>/`
- `/file/<id>/[delete|prop|edit]`

> Les urls du SAS restent accessiblent pour les roots & les admins SAS
> Les urls de profiles sont uniquement accessiblent aux roots

* Fix root dir of SAS being unnaccessible for sas admins

⚠️ need to edit the SAS directory & save it (no changes required in sas directory properties)

* Remove overwritten code

* Should fix duplicated albums in user profile (wtf)

* Fix typo

* Extended profiles picture access to board members

* Should fix #607

* Fix keyboard navigation not working properly

* Fix user tagged pictures section inside python rather than in the template

* Update utils.py

* Apply suggested changes

* Fix #604

* Fix #608

* Added back the permission denied

* Should fix duplicated albums in user profile (wtf)

* Fix user tagged pictures section inside python rather than in the template

* Apply suggested changes

---------

Co-authored-by: thomas girod <56346771+imperosol@users.noreply.github.com>
2023-05-02 13:07:36 +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
thomas girod
96dede5077
Speed up tests (#638) 2023-05-02 11:00:23 +02:00
thomas girod
b5a40cfda9
Mise à jour de Black vers la version 23.3 (#629) 2023-04-22 15:32:31 +02:00
Julien Constant
8e7c025e47
[FIX] Broken link in readme and license fix (& update) (#591) 2023-04-04 18:39:45 +02:00
Julien Constant
28f397574f
Amélioration des pages utilisateurs pour les petits écrans (#578, #520)
- Refonte de l'organisation des pages utilisateurs (principalement du front)
  - Page des parrains/fillots
  - Page d'édition du profil
  - Page du profil
  - Page des outils
  - Page des préférences
  - Page des stats utilisateurs

- Refonte du CSS / organisation de la navbar principale (en haut de l'écran)
- Refonte du CSS de la navbar bleu clair (le menu)
- Refonte du CSS du SAS :
  - Page de photo
  - Page d'albums
2023-03-30 14:38:40 +02:00
thomas girod
6c1fa6de0b
remove-useless-queries-counter-stats (#519) 2023-03-24 15:32:05 +01:00
Théo DURR
f0a08afd31
Merge branch 'repair_NaN_bug_on_click' into taiste 2023-03-10 10:50:26 +01:00
Thomas Girod
25c5a3297c Repair NaN bug for autocomplete on counter click 2023-03-09 14:21:12 +01:00
Théo DURR
dd3ad42eb5
Mise à jour de février (#581)
Co-authored-by: Thomas Girod <thgirod@hotmail.com>
Co-authored-by: Julien Constant <julienconstant190@gmail.com>
Co-authored-by: Skia <skia@hya.sk>
2023-03-09 13:39:33 +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