Commit Graph

178 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
dd07c374d7 convert uploaded images to webp 2024-09-01 19:05:54 +02:00
thomas girod
cc1d700f7d add forgotten migration 2024-08-29 11:57:09 +02:00
thomas girod
ff088009d9 move static files in their respective application 2024-08-26 22:34:31 +02:00
thomas girod
68d0a16d1c
Merge pull request #782 from ae-utbm/ajax-navigation-history
Ajax navigation history in uv guide
2024-08-26 22:29:19 +02:00
thomas girod
4036bfd703
Merge pull request #775 from ae-utbm/user-pictures-ajax
Render user picture page with ajax to improve performances
2024-08-18 12:40:07 +02:00
Sli
2a6c1f050d Create a paginate_alpine macro 2024-08-11 15:11:51 +02:00
Sli
589119c9ee Improve update_query_string with enum action 2024-08-10 23:32:50 +02:00
Sli
b35e1a476e Fix back function in album pagination 2024-08-10 18:38:04 +02:00
thomas girod
72ea6b6fdd fix crash on album fetch & test 2024-08-10 00:46:40 +02:00
Sli
0eeaf1ce21 Render user picture page with ajax to improve performances 2024-08-09 18:09:58 +02:00
thomas girod
9163e4dee6 fix SAS album display 2024-08-09 18:08:36 +02:00
thomas girod
3ef38fabdb fix picture navigation 2024-08-09 17:34:35 +02:00
thomas girod
7ea9a5ca2d improved feedback when loading ajax content 2024-08-09 11:58:26 +02:00
thomas girod
20c015c312 improved UX 2024-08-09 11:58:26 +02:00
thomas girod
00dc03a235 fix rights on albums and next/previous pictures 2024-08-08 13:35:48 +02:00
thomas girod
d3b203a4a1 change cache on picture download 2024-08-08 11:50:45 +02:00
thomas girod
4506440a62 add PictureQuerySet.viewable_by(user) method 2024-08-08 11:50:45 +02:00
thomas girod
da6bd84cdf restify album view 2024-08-08 11:50:45 +02:00
thomas girod
0b9ccf6a57 paginate GET /api/sas/picture 2024-08-08 11:50:45 +02:00
thomas girod
29bb0f6712 promote AlpineJS to global dependency 2024-08-05 17:08:30 +02:00
thomas girod
946f35c601
Merge pull request #752 from ae-utbm/autocomplete-admin
use autocomplete_fields in admin
2024-08-01 13:01:27 +02:00
thomas girod
eef15e05f4 use autocomplete_fields in admin 2024-08-01 11:27:54 +02:00
Sli
f265346a10 Sort pictures by album in zip file 2024-07-31 12:01:08 +02:00
thomas girod
424639ea80 better scss 2024-07-26 15:55:15 +02:00
thomas girod
043dcfb283 add tests 2024-07-26 14:25:26 +02:00
thomas girod
191b05c305 Fix button to remove a user from picture 2024-07-25 23:31:54 +02:00
thomas girod
215fdce411 Fix button to remove a user from picture 2024-07-25 23:29:12 +02:00
thomas girod
b25805e0a1 introduce djhtml as jinja+scss formater 2024-07-25 16:46:45 +02:00
Sli
fee7ade1a5 Harmonize test names 2024-07-24 00:50:48 +02:00
Sli
0c566cfbde Add picture size in sas api 2024-07-24 00:44:09 +02:00
thomas girod
cb1aa8bef0 add tests 2024-07-23 20:36:57 +02:00
thomas girod
3046438cb1 replace drf by django-ninja 2024-07-23 19:57:33 +02:00
thomas girod
8c69a94488 use google convention for docstrings 2024-07-21 00:57:04 +02:00
thomas girod
f941435232 ruff rule C4 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
3143d3d91a reorganize imports with ruff 2024-06-26 12:35:38 +02:00
Sli
e1bf7caa9a Fix CVE-2023-31047 2024-06-24 13:27:22 +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
b5a40cfda9
Mise à jour de Black vers la version 23.3 (#629) 2023-04-22 15:32:31 +02:00
Julien Constant
c1022642a2 [FIX] Fixes supplémentaires pour la màj de mars (#622)
- Les photos de l'onglet de la page utilisateur utilise désormais leur version thumbnail au lieu de leur version HD
- Une des classes du CSS du SAS a été renommée car elle empiétait sur une class de la navbar
- Le profil utilisateur a été revu pour ajouter plus d'espacement entre le tableau des cotisations et le numéro de cotisants
- Les images de forum & blouse sont de nouveau cliquable pour les afficher en grands
- Sur mobile, lorsqu'on cliquait sur le premier élément de la navbar, ce dernier avait un overlay avec des angles arrondis
- Sur mobile, les utilisateurs avec des images de profils non carrées dépassait dans l'onglet Famille
2023-04-08 20:59:43 +02:00
Julien Constant
d83842af27
Fix problème de cache dans le SAS & améliore le CSS du SAS
Co-authored-by: Bartuccio Antoine <klmp200@users.noreply.github.com>
2023-04-05 14:32:32 +02:00
Julien Constant
f605f7dcc6
Fixes pour la mise à jour de mars (#598) 2023-04-04 22:55:26 +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
99827e005b
upgrade re_path to path (#533) 2023-01-09 22:07:03 +01:00
Sli
98bfc308a7 Minimal working version
* Upgrade dependencies
* Fix ugettext
* Fix bad urls
2022-08-04 00:28:09 +02:00
4a1bfc366d
sas: fix 500 error when tagging the same user twice or adding a non existing user 2019-12-17 11:25:17 +01:00
d7075eb762
django2.2: fix breaking change for getting uploaded files size 2019-10-08 22:46:38 +02:00
97c316b62e
django2.2: replace removed is_anonymous() and is_authenticated to their now used counterparts 2019-10-08 22:46:03 +02:00
3cb306bc91
django2.2: add on_delete on migrations for ForeignKey 2019-10-08 22:46:03 +02:00
4dadb1dbc0
django2.2: add default mandatory on_delete on all ForeignKey 2019-10-08 22:46:01 +02:00
2616e8b24c
django2.2: relpace django.core.urlresolvers by django.urls 2019-10-08 22:46:01 +02:00
be855c6c90
django2.2: migrate url to re_path 2019-10-08 22:46:01 +02:00
298499c749
sas: add cache on Picture permissions to avoid hitting the bdd too much 2019-09-16 11:33:32 +02:00
b8ad2d4835
sas: add pagination on AlbumView 2019-09-16 01:26:20 +02:00
8330e1eaf2
sas: simplify and optimize permissions for SAS images 2019-09-15 16:43:17 +02:00
cb58b00b6e
All: Apply Black coding rules 2018-10-05 21:52:55 +02:00
5c4a16d14c
Fix user pictures display 2018-06-10 18:43:39 +02:00
Skia
bf57329bd8 sas/templates: Improve generation time display 2018-04-18 23:49:12 +02:00
Skia
874dfa6cc3 sas/views: change categories ordering 2018-04-18 22:58:03 +02:00
Skia
578fa1495d sas: fix notification callback
Signed-off-by: Skia <skia@libskia.so>
2017-10-15 12:00:33 +02:00
Skia
43f51813e0 sas: fix album preview
Signed-off-by: Skia <skia@libskia.so>
2017-10-06 17:57:54 +02:00
Skia
49b77480e6 sas: clean up old notif trigger
Signed-off-by: Skia <skia@libskia.so>
2017-09-25 12:50:02 +02:00
Skia
f0c34fe70c sas: add permanent notification for SAS moderation
Signed-off-by: Skia <skia@libskia.so>
2017-09-25 12:35:56 +02:00
Skia
469304585c sas: update models managers
Signed-off-by: Skia <skia@libskia.so>
2017-09-25 12:34:05 +02:00
Skia
e085556def sas: allow ancient subscriber to add people on pictures
Signed-off-by: Skia <skia@libskia.so>
2017-07-26 16:55:00 +02:00
9447de4468 fix merging 2017-06-13 10:49:11 +02:00
e2311dcb71 Format sas 2017-06-13 10:04:13 +02:00
Skia
83deae5964 Apply GPLv3 to Sith, and add header to every concerned file 2017-04-24 17:51:12 +02:00
60e2e0d4f9 Better to use os.path.join for paths 2017-03-30 19:13:47 +02:00
1f844da005 Preload on sas 2017-03-28 18:46:10 +02:00
Skia
b28ce200e6 Fix some translations 2017-03-27 14:31:58 +02:00
Skia
59dfcbd567 Merge branch 'forum' into 'master'
Forum

See merge request !49
2017-02-24 03:08:07 +01:00
Skia
dea234f98a Change is_subscriber and was_subscriber to cached_properties 2017-02-24 02:59:59 +01:00
Skia
aa93211025 Add support for editing album date 2017-02-21 14:29:58 +01:00
Skia
494062fbbe Fix thumbnail generation for album upload view 2017-02-02 23:07:45 +01:00
Skia
4cc57c183e Add some better right management to forum 2017-01-28 20:58:54 +01:00
Skia
5a305354cb Add recursive option to file props form 2017-01-12 20:55:47 +01:00
Skia
881afd9e0a Improve SAS main view, and make some translations 2017-01-10 23:32:17 +01:00
Skia
766d913afe Change SAS upload pool size 2017-01-09 13:05:50 +01:00
Skia
a90a553939 Some fixes on SAS upload form 2017-01-05 10:05:27 +01:00
Skia
4ae4d2b6db Add overwrite mode and change compressed size width in picture resizing 2016-12-19 16:20:50 +01:00
Skia
352b8f0b4f Add recursive option to apply rights in the SAS 2016-12-18 19:08:25 +01:00
Skia
dd2be2a31e Auto generate album thumbnails 2016-12-18 18:34:48 +01:00
Skia
9f35f74082 Huge performance improvement in SAS, miss the album thumbnail in most cases 2016-12-18 12:35:23 +01:00
Skia
4a7df31f5e Some other performance improvements 2016-12-18 11:55:45 +01:00
Skia
57d8926a3f Improve SAS moderation interface 2016-12-15 13:10:05 +01:00
Skia
642249e7fb Notification fix 2016-12-14 09:11:26 +01:00
Skia
d7a065c4e2 Update SAS rights 2016-12-13 18:36:08 +01:00
Skia
bf9aa29a54 Add clipboard to SAS 2016-12-13 17:17:58 +01:00
Skia
f594a99751 Clean up, fix, and improve templates around clipboard 2016-12-13 01:24:23 +01:00
Skia
0859648bd4 Add cut/paste function in files 2016-12-13 00:45:38 +01:00
Skia
8b63fa9aea Store file moderator 2016-12-12 17:23:06 +01:00
Skia
2919f3a133 Allow former subscribers to see pictures 2016-12-12 16:35:52 +01:00
Skia
0d4b697079 Refactor group settings 2016-12-10 01:29:56 +01:00
Skia
d92a706920 Refactor notifications 2016-12-10 00:06:17 +01:00
Skia
b53531c391 Add another method to moderate pictures in SAS 2016-12-09 19:35:23 +01:00