Commit Graph

73 Commits

Author SHA1 Message Date
Darks 63baae9683
Merge branch 'glados' of gitea.planet-casio.com:devs/PCv5 into dev 2020-11-11 13:47:24 +01:00
Darks 98de289ea1
glados: added glados socket and example wrapper 2020-11-11 13:28:53 +01:00
Lephe 1d38f906ee
admin/members: add a dynamic regex/logic filter for the member list
This commit introduces a client-side table filter that supports regexes
and propositional logic to filter table rows.

A table can be filtered if it has the [filter-target] class and its
first row has <th> tags with a [data-filter] attribute specifying column
names.

The filter itself is a div with the [form] and [filter] classes, and a
[data-target] attribute pointing to the table to filter. The filter
contains a text <input> which is passed to filter_update() when the
filter expression is validated.

The client-side filter code runs the expression through a basic lexer
and parser, then matches the result for every row in the target table.
The [textContent] of each cell is used for string and regex matching.
2020-11-02 14:38:28 +01:00
Darks 0d8dd70956
security: add CSRF protection globally
The decorator @check_csrf can be used to check CSRF protection when 
using GET links (like delete a post or logout)
2020-09-26 14:48:30 +02:00
Darks 9409113167
markdown: add markdown rendering 2020-09-18 19:43:10 +02:00
Eragon b5f1ea1d1d
Un seul chargement du script même avec plusieurs textarea
Le script est chargé de manière standard, comme les autres scripts.
L'init du script est lancé seulement après le chargement complet
de toute les dépendances de la page.
2020-09-18 11:53:50 +02:00
Eragon c419716806
Utilisation de https://github.com/sparksuite/simplemde-markdown-editor comme éditeur
Ajout des fichiers dans les fichiers statiques. (min.css & min.js).
Supression des scripts custom d'édition.
Remplacement par les bon appels de fonctions dans app/templates/widgets/editor.html
2020-09-17 22:41:32 +02:00
Darks df745fd4a6
ldap: add sub-organization feature 2020-08-25 23:05:54 +02:00
Darks c5e99807e3
fix a typo in many files 2020-08-25 22:57:45 +02:00
Darks 7395835e71
refact: models files are nom uniform (all singular) 2020-08-06 21:19:01 +02:00
Darks 107c891553
fix(validators): cleaned a bit the directory 2020-08-06 00:04:47 +02:00
Darks 3fb3ee40d2
fix: better PEP8
Flake8 returns less errors. I ignored lots of them though
2020-08-05 22:52:56 +02:00
Darks a83cef5970
attachments: fix #67 2020-08-02 15:03:08 +02:00
Darks 554898db87
attachments: merged attachments system into dev 2020-08-01 21:47:25 +02:00
Darks 56a584c535
attachments: added attachments system
Still need some work on it…
2020-08-01 21:26:06 +02:00
Lephe 79600e8598
templates: add a dynamic date format
More reader-friendly (in French at least).
2020-08-01 15:44:47 +02:00
Darks a4efe29a7d
__init__.py: refactor registration of assets 2020-07-30 14:49:18 +02:00
Darks b108ce4cfe
titles: add displayed title (#65)
- with forms for user and admins
2020-07-29 00:57:06 +02:00
Darks e35910ee76
config: refactor configuration values
- System/host config values stay in `config.py`
- Application config values moves in corresponding models
- BREAK: AVATAR_FOLDER becomes DATA_FOLDER. Edit your local config if 
needed
2020-07-26 16:50:07 +02:00
Darks 0896a6b163
passwords: enhances passwords rules
- based on entropy (min 60 bits)
- adds a coloured progress bar if Js is enabled
2020-07-25 18:06:49 +02:00
Darks 5baad9f849
utils: FIX titre de l'email de réinit du mot de passe 2020-07-21 22:39:09 +02:00
Darks 1292791113
utils: fix send_mail >_< 2020-07-21 22:37:31 +02:00
Darks 77bcb99ea1
account: ADD mot de passe oublié 2020-07-21 22:12:18 +02:00
Darks 16756f639f
utils: Ajout du décorateur @guest_only 2020-07-21 21:42:56 +02:00
Darks 8bf825f9ea
registration: ADD email validation 2020-07-21 21:06:00 +02:00
Darks 4d3e1a14f3
profil: complétion de la page de profil (#9) 2020-07-19 21:14:34 +02:00
Darks b2ea2ce6ad fix: set page optionnal 2020-07-17 00:27:45 +02:00
Darks 1ef055f629
enhancement: added modularity to converters 2020-07-17 00:17:11 +02:00
Lephe 17c78204a6
update the route model for the forum to <id>/<page>/<slug>
This works by bundling the topic object and page number in a pair during
conversion to/from URL, so that the slug can be computed effortlessly
and put in all links.
2020-07-16 23:58:21 +02:00
Darks 04fb3225c1
refactor: passage aux variables CSS4 2020-07-13 22:54:34 +02:00
Darks bd559b9fad
Modif du style sur les titres dans le panel admin 2019-12-10 20:52:09 +01:00
Darks 51d0ce1129
Meilleure gestion des erreurs sur le changement d'avatar 2019-12-10 00:38:04 +01:00
Darks 04e317285f
Ajout du style pour la barre de pagination 2019-12-07 16:43:19 +01:00
Darks cdbecac166
Stage 2 pour le changement de config (#38) 2019-12-05 23:06:44 +01:00
Darks d480a95e43
Premier passage à la configuration unifiée (#38) 2019-12-05 22:49:18 +01:00
Darks da96de2f14
Ajout d'un premier jet d'éditeur Js de LightScript 2019-12-04 22:16:29 +01:00
Darks 4e4508c4fd
Correction de bugs
- TextField → EmailField
- Problème au login si le nom n'est pas normalisable
2019-12-04 17:02:00 +01:00
Darks 0a85f1fbee
Ajout de l'éditeur :D 2019-12-04 16:25:05 +01:00
Darks e99e45b4ca
Modifications majeures du rendu du menu
- Les context processors sont dans un dossier à part
- Ajout du dynamisme dans le menu (récupération des derniers messages de 
topic)
2019-12-04 01:16:16 +01:00
Darks 1434b3152b
Amélioration des slugs (utilisation de python-slugify) 2019-12-03 21:03:23 +01:00
Darks 662882cc15
Ajout des commentaires de topics
On ne peut pas encore modifier le top comment ni commencer un topic à 
partir d'un thread externe, mais les bases sont là :)
2019-12-03 20:32:01 +01:00
Darks 279c194a59
Ajout du support de LDAP
Mettre le flag à True dans local_config.py pour l'activer, et la doc 
dans VPS-config pour setup l'environnement
2019-11-28 13:10:50 +01:00
Darks 3691520399
Quelques améliorations sur le code front-end 2019-11-28 11:32:53 +01:00
Darks ad41b5be38
Solved a security issue
Users could create accounts named Admin, ROOT, etc.
2019-11-21 16:27:53 +01: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 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 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
Darks 15a4d38ea0
Ajout des notifications 2019-09-01 12:30:41 +02:00
Darks 81c910832b
Ajout des post/thread/comment/etc. 2019-08-20 17:34:00 +02:00