Commit Graph

175 Commits

Author SHA1 Message Date
Lephe e0dc6944f7
gitignore: add a generic "exclude" folder
For notes, TODOs, whatever at a personal level.
2019-09-09 08:11:39 +02:00
Lephe 3ad3eca470
forum: list subforum topics
Also introduces a 'date' filter that displays date in a readable format.
2019-09-09 08:11:39 +02:00
Lephe 79e5af7924
users: allow norm-equivalent names in profile url 2019-09-09 08:11:38 +02:00
Lephe 8a0ba309e0
forum: restructure models and add topic creation
This changes fixes #25 by restructuring the forum models in a way
compatible with the polymorphic behavior of SQLAlchemy. Incidentally,
the new form turns out to be more appropriate for our use than the
polymorphic one originally used.

The migration for this task is non-trivial because the Thread class was
created with a foreign-key id which thus had no auto-increment or
associated sequence. The most reliable way of getting it back was to
recreate the table because SQLAlchemy ony performs automated sequence
introduction at table creation time. Four separate migration files
perform the whole change.

This commit also adds views and forms to create topics, and the
boilerplate for an advanced markup editor that can be used as a widget.
2019-09-09 08:11:38 +02:00
Lephe d1a8333cae
forum: add forum listing routes
With this change, URLs for forum listings are now available. This
includes URLs like /news or /projects/games. Each of them show a
(currently empty) forum index.

Note that URLs that are not linked to in the forum index, namely URLs
for forums that have children (eg. /forum/news), are still accessible. We
could ban this by raising ValidationError if the forum has a non-empty
[sub_forums] attribute but displaying all subjects feels better.

URLs that point to /forum, but do not name a sub-forum and are not of
the form of a topic URL produce 404 errors.
2019-09-09 08:11:38 +02:00
Lephe 10e3c88bd4
errors: use the title block 2019-09-09 08:11:38 +02:00
Lephe 9f30bd36a0
forum: add the forum index page
Also prepare some functions for topic listings for each forum.
2019-09-09 08:11:38 +02:00
Lephe 35f1335f64
forum: better tree visualization, and topics
Turns the forum tree visualization in the admin panel into a tree-like
table, and exposes the Topic class to the application and database.
2019-09-09 08:11:38 +02:00
Lephe 153f303857
rebase migration scripts from the notifications branch 2019-09-09 08:11:38 +02:00
Lephe aa75ff09a1
forum: implement forum tree generation
This commit adds a forum tree YAML file (URL-based rather than an
actual tree...) and the 'forums' and 'create-forums' commands for
the master script.

A page /admin/forums is also used to currently display the forum
tree, although this will probably be turned into a full table with
forum descriptions, and a form with edition capabilities.
2019-09-09 08:11:37 +02:00
Darks de83f09024
Ajout d'un logo plus petit pour ne pas charger le gros en permanence
Dans l'idéal faudrait même faire une version svg
2019-09-08 23:10:28 +02:00
Darks a29657da24
Merge branch 'dev' of gitea.planet-casio.com:devs/PCv5 into dev 2019-09-08 22:38:57 +02:00
Darks 035e4f9062
Corrections de style
Cf post 
https://www.planet-casio.com/Fr/forums/lecture_sujet.php?id=15836&page=last#168760
2019-09-08 22:38:19 +02:00
Eragon b628510455
Merge branch 'dev' of gitea.planet-casio.com:devs/PCv5 into dev 2019-09-08 16:45:11 +02:00
Eragon 2b8a78fe20
Issue #3, remplir /register/validation 2019-09-08 16:44:10 +02:00
Darks 0a33161af0
Corrige une erreur 500 si l'on se connecte sur un compte inexistant 2019-09-08 12:28:39 +02:00
Darks 7cad3d4345
Correction préférence de newsletter
À l'inscription, la préférence de la newsletter n'était pas prise en 
compte. Merci Hackcell pour la remontée du bug.
2019-09-08 11:38:26 +02:00
Darks 5bf90f9d05
Corrections de CSS
Corrige #26 et améliore un poil le bouton « se souvenir de moi » en mode 
light.
2019-09-07 21:54:59 +02:00
Darks ab6275c08f
Correction de bug
Il manquait un import menant à une erreur 500 lors d'une redirection 
avec `?next=some_url`
2019-09-07 14:58:16 +02:00
Eragon dbef50cb86
Ajout du temps maximum d'inactivité pour une connexion
Issue n° #23 Fixer le temps d'une session par cookie (Remember me)
Corrigé, par l'ajout d'une option dans le fichier de configuration et
du code pour gèrer ça.
2019-09-07 14:15:31 +02:00
Darks 2e80a56596
Ajout d'un groupe `nologin` (corrige #22)
Les comptes GLaDOS et PlanèteCasio sont automatiquement ajoutés au 
groupe "No login", qui empêche l'utilisateur de se connecter, et ce même 
si les identifiants sont corrects.
2019-09-03 09:28:07 +02:00
Darks 6d43d742c8
Mieux quand les notifs sont dans l'ordre anti-chronologique 2019-09-01 22:54:53 +02:00
Darks 7971e47522
Debug sur notifs, ajout du nombre dans le menu latéral
L'affichage du nombre de notifs méritera peut être un coup de peinture… 
À voir.
2019-09-01 22:33:00 +02:00
Darks c2fbef7ace
Petite modif, test de CI sur dev 2019-09-01 21:59:40 +02:00
Darks 15a4d38ea0
Ajout des notifications 2019-09-01 12:30:41 +02:00
Darks 0c7c408e40
Ajout d'un fichier de configuration local, non tracé par git 2019-09-01 10:35:37 +02:00
Darks 4868774b96
Test d'intégration continue 2019-09-01 00:32:20 +02:00
Darks f508536805
Détaché le nom de la bdd du fichier de config 2019-08-31 23:00:43 +02:00
Lephe eeaab86d0a forum: improve model relationships (so that it works) 2019-08-24 19:17:13 +02:00
Lephe 11b19af199 forum: provide suitable migrations for the database
First migrate without the foreign key to create the tables, then add the
foreign key in a second migration.

Also removed unneeded imports that caused dependency cycles.

Minor "style" edits with the ambiguous use of super and unnecessary
db.Model inheritance.
2019-08-21 16:50:23 +02:00
Darks 201e961ba2
Ajout des stats sur la durée de chargement 2019-08-20 18:07:16 +02:00
Darks 81c910832b
Ajout des post/thread/comment/etc. 2019-08-20 17:34:00 +02:00
Darks 420117f95c
Renommé la classe Content en Post, quelques ajouts en plus 2019-08-19 22:36:55 +02:00
Lephe 4cefe39c36 trophies: automatically remove undeserved trophies
... and other minor edits from the trophies branch.
2019-08-19 17:26:22 +02:00
Lephe 4d91ed65da add a subfolder for the wiki in the gitignore 2019-08-13 13:06:54 +02:00
Darks 6980e5e85f
Ajout des URL vers la forge et le wiki 2019-08-10 20:28:35 +02:00
Darks e6544a68c7
Merge branch 'trophies' 2019-08-10 20:11:24 +02:00
Darks 7f640a13e9
Modification de la zone d'admin des comptes
Retrait de la liste déroulante au profit d'une liste de checkbox. Il 
faudra ajouter les icones.
2019-08-10 20:06:07 +02:00
Darks 95efa36228
Tentative (foireuse) de générer une liste de BooleanInput 2019-08-10 00:07:50 +02:00
Darks ff21d89c23
Small modifications 2019-08-09 23:20:53 +02:00
Darks 040f62c894
Correction d'une erreur de style 2019-08-06 12:52:07 +02:00
Darks 1d638689c6
Modifications on trophies and titles #10 (and more)
- remove `title` attribute
- do the migration of db
- add initialization routine in `master.py`
- add default trophies and titles in `data/trophies.yaml`
- add `add_trophy` method in `Member` class
- add `update_trophies` method in `Member` class
- add form in admin panel to give a trophy to a member
- same to remove a trophy
- change `if request.method == "POST"` to `if form.submit.data`
2019-06-11 00:15:23 +02:00
Lephe a29e0c4411 core: parameterize minimum password length
Also try to make the code even lighter.
2019-06-07 14:23:48 -04:00
Lephe 43264d9de1 account: small trophy improvements on #10 2019-06-07 13:48:28 -04:00
Darks e67cfb2190
Un peu moins de verbosité dans les erreurs de mot de passe 2019-06-07 14:36:47 +02:00
Darks adf4b99a9b
Ajout de règles pour la validation des mots de passe. #13
Je vous conseille d'avoir un bon gestionnaire de mots de passe du coup 
:D
2019-06-07 14:00:26 +02:00
Darks 809859268a
Petite correction sur les droits 2019-06-07 01:56:18 +02:00
Darks b6eae7fef4
Oups :E 2019-06-07 01:49:43 +02:00
Darks 1bdad7c9e4 Merge branch 'trophies' of devs/PCv5 into master 2019-06-07 01:47:05 +02:00
Darks f67129a36b
Ajout des trophées et du panel pour les gérer 2019-06-07 01:44:04 +02:00