Commit Graph

1951 Commits

Author SHA1 Message Date
Cyl
61a40c47d2 [com]: add helper_text for resolution and format of poster 2021-09-29 16:09:05 +02:00
Skia
007157e2e8 Merge branch 'datetime-hell2' into 'master'
core: create TzAwareDateTimeField to replace forms.DateTimeField

Follow up of !267. I read about Gitlab's slash and merge just after I did my own kind by resetting back to the original commit and creating one commit manually. Sublime merge helps but I still need more practice. :)

What was the right way to group every commit under one?

See merge request ae/Sith!270
2021-09-29 13:53:12 +00:00
tleb
49a0ade315 core: create TzAwareDateTimeField to replace forms.DateTimeField 2021-09-29 15:24:06 +02:00
Skia
782cd9a45a Merge branch 'sexy-search' into 'master'
Sexy search

The goal of this MR is to solve the search issue #96. Let's assume we have a user with firstname `Jean-François`, lastname `Du Pont` and nickname `Ai'gnan`. Here is a list of search that did not include him previously but now includes him (was and still is case-insensitive):

* `jean françois` (missing -) ;
* `jean-francois` (missing ç) ;
* `jean francois` (both) ;
* `dupont` (space) ;
* `françois` (not the start of his name) ;
* `aignan` (missing ').

You get it, there are a lot of mistakes that humans can do. It also sorts results by `User.last_update` to avoid putting old accounts at the top of common requests (such as firstname-only or lastname-only requests).

### How it works

For those who don't know, the search is handled by Xapian (the search backend) through the haystack library which provides a Django-friendly interface to multiple search backends. Xapian maintains kind of a duplicate of the database (only for models against which we want to search something) which is optimised for search operations. Its "models" are called "indexes" (see `core.search_indexes.UserIndex` for the user model).

Every time a user is created or modified, it is indexed (through a signal handler) so that Xapian knows about it. For the user search, what is indexed is the string outputted by the `core/templates/search/indexes/core/user_auto.txt` template. For our example from above, it looks like this:

```
jean francois
du pont
aignan
jeanfrancois
dupont

jeanfrancoisdupont
```

As you can see, unicode is removed. There also are kind-of duplicates with different spacing as we are using an autocomplete algorithm: it searches from the beginning of words.

The one I am not sure about is the last one. Its goal is to allow searching without putting a space between the firstname and lastname. Is this useful?

The prod will have to do a `./manage.py update_index`, not sure it does it in the upgrade script.

See merge request ae/Sith!269
2021-09-28 00:14:38 +00:00
tleb
6382e631b6 search: reduce user index size 2021-09-28 01:44:15 +02:00
tleb
12493cffca search: make sure we don't have indexes that are too long 2021-09-28 01:44:15 +02:00
tleb
a38ab57ddf search: sort by User.last_update 2021-09-28 01:44:15 +02:00
tleb
30091ef69c search: ascii everywhere and unformalized whitespace 2021-09-28 01:44:15 +02:00
Skia
1a483bfa2c Merge branch 'och' into 'master'
Settings: Added new subscription for the new CA offer

This year we made a new deal with the CA: if a student open an account, they give us 50€ and the student 80€ with on year of subscription.

See merge request ae/Sith!276
2021-09-27 23:31:46 +00:00
Francesco
1a091951e8 Added new subscription for the new CA offer 2021-09-28 01:11:23 +02:00
Skia
bfb66b352a Merge branch 'dep-hell2' into 'master'
core: add ./manage.py check_front command and call it on runserver

See #92 and !268.

This simplifies checking that front-end dependencies are up to date. It does not allow one to update an outdated dependency. That must be done manually (would otherwise require depending on a CDN or add npm as a dependency). A manual update will make sure changelogs are read and changes will be made appropriately.

We add a `check_front` command to `manage.py` and run it on calls to `runserver`.

This MR does not update any dependency as it is not its goal. MR incoming!

Should doc be added? It seems pretty simple and I don't see what should be documented: if it's red, update it.

~"Review TODO" @sli

See merge request ae/Sith!271
2021-09-27 20:23:35 +00:00
tleb
be26e3df7f core: add ./manage.py check_front command and call it on runserver 2021-09-27 22:00:36 +02:00
Skia
cb3307509d Merge branch 'skia/counter_rework' into 'master'
counter: make click page dynamic to avoid repetitive loading

See merge request ae/Sith!278
2021-09-27 19:21:28 +00:00
Skia
a3158253a7 Black update 2021-09-26 13:58:39 +02:00
Skia
406380e4f1 counter: make click page dynamic to avoid repetitive loading
This makes the whole click page load only once for a normal click
workflow. The current basket is now rendered client side with Vue.JS,
and the backend view is able to answer with JSON if asked to.

This should lighten the workflow a lot on the client side, especially
with poor connectivity, and the server should also feel lighter during
big events, due to far less complex Jinja pages to render.
2021-09-26 13:58:39 +02:00
Skia
efb70652af counter: redirect to counter main when barman login is timed out 2021-09-26 13:58:39 +02:00
Skia
05256bb99a counter: templates: click: JS clean up 2021-09-26 13:58:39 +02:00
Skia
64d0cc2fa8 counter: don't display info boxes and navigation menu
This will lighten the pages and make the functionality directly
accessible without ever scrolling the header garbage that is never
needed on those pages.
2021-09-26 13:58:39 +02:00
Skia
f5d7267ba7 Merge branch 'skia/fix_ci' into 'master'
Fix CI

See merge request ae/Sith!277
2021-07-21 13:16:02 +00:00
Skia
24c0a21cc1 locale: update with latest code version 2021-04-23 12:02:03 +02:00
Skia
6a352d642b accounting: fix tests with a computed date instead of hard-coded one 2021-04-23 12:02:03 +02:00
Sli
48ae1f7c1c Merge branch 'och' into 'master'
Edited subscriptions

See merge request ae/Sith!275
2020-09-01 00:21:48 +02:00
Francesco Witz
aaf1adaaa1 sith: Added a new subscription 2020-08-30 23:53:19 +02:00
f34f5fe693
Upgrade black and format accordingly 2020-08-27 15:59:42 +02:00
Sli
f485178422 Merge branch 'och' into 'master'
settings: Added a new subscription

See merge request ae/Sith!274
2020-06-18 00:23:51 +02:00
Och
797ca0f926 settings: Added a new subscription 2020-06-18 00:23:51 +02:00
Sli
390a4b0064 Merge branch 'bugfix' into 'master'
cache: fix error 500 with new django version

See merge request ae/Sith!273
2020-06-16 19:11:49 +02:00
94b029dc9c
cache: fix error 500 with new django version 2020-06-12 20:44:37 +02:00
Sli
45d5728c3e Merge branch 'skia/lazy_load_user_pictures' into 'master'
core: add lazy loading in user pictures page

See merge request ae/Sith!272
2020-06-12 20:19:34 +02:00
Skia
6eabbaf209 core: add lazy loading in user pictures page 2020-05-15 12:14:14 +02:00
Sli
03fdd0b947 Merge branch 'trombi' into 'master'
trombi: raw tool for trombi admins to add a club membership to a trombi member

See merge request ae/Sith!266
2020-03-23 21:12:58 +01:00
fb8faacddc
trombi: raw tool for trombi admins to add a club membership to a trombi member 2020-03-22 16:14:37 +01:00
Sli
7ee4557ab5 Merge branch 'fix-webcam-error' into 'master'
Front: turn Webcam.js error from an alert to a console log

See merge request ae/Sith!265
2020-03-05 19:20:22 +01:00
tleb
5accdbccbb Front: use Webcam.on() for error handling 2020-03-04 07:13:16 +01:00
tleb
7fb26f9e45 Front: turn Webcam.js error from an alert to a console log 2020-03-03 09:01:20 +01:00
CHARMEAU
26a07f722d Remove gender option of matmatronche & update gender settings 2020-02-16 17:51:51 +01:00
Sli
9176a03a8a Merge branch 'bugfix' into 'master'
Fix some SAS and forum errors

Closes #89

See merge request ae/Sith!263
2019-12-17 12:03:28 +01: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
ebee8c34e1
forum: fix ForumTopicSubscribeView error 500 with anonymous user 2019-12-16 15:00:33 +01:00
4ecad1c73b
Revert "PÈRE 200 !!!!!!!!!!! PÈRE 200 !!!!!!!! TRALALALALÈREEEEUUUU !!!!"
This reverts commit d1b3a4d3f6.
2019-12-10 15:31:37 +01:00
d1b3a4d3f6
PÈRE 200 !!!!!!!!!!! PÈRE 200 !!!!!!!! TRALALALALÈREEEEUUUU !!!! 2019-12-09 03:16:57 +01:00
Sli
40832bb3bf Merge branch 'clubs' into 'master'
Improve Sellings view for clubs

See merge request ae/Sith!262
2019-11-29 16:32:18 +01:00
4a78157f9a
club: fix typo on ClubSellingView 2019-11-28 15:14:51 +01:00
bf5fc8750d
club: steam CSV download for SellingView 2019-11-28 14:52:33 +01:00
274a7b7137
core/club: allow adding custom js action to pagination link, useful for FormDetailView with pagination 2019-11-28 01:46:41 +01:00
8dd2c02d3e
club: add pagination for ClubSellingView 2019-11-28 00:30:51 +01:00
a73f5cb270
club: use sums in bdd for ClubSellingView 2019-11-27 21:37:59 +01:00
7d40e11144
club: ClubSellingView way faster and with multiple selections everywhere 2019-11-27 20:59:32 +01:00
af48553e35
club: separation between archived products and non archived ones 2019-11-27 16:23:14 +01:00
Sli
ad8bcc7282 Merge branch 'bugfix' into 'master'
com: fix 500 error when utbm mail server refuse weekmail

See merge request ae/Sith!260
2019-11-25 14:18:22 +01:00