Commit Graph

32 Commits

Author SHA1 Message Date
Lephe 8ff21c615d
program: add infrastructure for the progrank job (#114)
* Add an automatic job every day at 4 AM to recompute the progrank of
  every program. Currently everyone gets progrank 0.

[MIGRATION] This commit contains a new version of the schema.

[SETUP]
* Install flask-crontab (with pip)
* Run `flask crontab add` to register the jobs
2022-06-15 11:27:29 +01:00
Lephe b047ed97af
programs: program creation + view + comments
This is very much a work in progress, but the main ideas are here.

[MIGRATION] This commit contains a new version of the schema.
2022-05-19 20:34:46 +01:00
Lephe 8f620c6150
meta: add optional setting for flask-debug-toolbar
It provides profiling information and an overview of SQL requests while
in development.
2022-05-05 20:33:46 +01:00
Lephe a3ed633791
config: update and slight improvements
* Rename Config → FlaskApplicationSettings so we know exactly what we're
  talking about
* Clarify that LocalConfig overrides both V5Config and Flask settings
* Only give defaults that are needed in LocalConfig and remove old
  settings that are no longer used
2022-05-05 20:33:45 +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 56a584c535
attachments: added attachments system
Still need some work on it…
2020-08-01 21:26:06 +02:00
Darks a4efe29a7d
__init__.py: refactor registration of assets 2020-07-30 14:49:18 +02:00
Lephe 6b280c6901
trophies: add icons 2020-07-22 10:44:56 +02:00
Darks 8bf825f9ea
registration: ADD email validation 2020-07-21 21:06:00 +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 f6be314ed7
Correction d'une méga faille de sécu
Ajout d'un fail-safe si la clé est celle par défaut
2019-12-04 12:22:16 +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 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 d4e1b05c29
Divers correctifs
- Le menu est utilisable sans Js (penser à mettre à jour les endpoints)
- Réorganisation des templates
- Ajout d'une page listant les outils
2019-11-28 14:14:35 +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 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 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 15a4d38ea0
Ajout des notifications 2019-09-01 12:30:41 +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 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
Darks 79e3189f4b
First draw for trophies 2019-06-06 23:24:14 +02:00
Darks d6e8f7d4d8
Split routes to folders 2019-06-06 02:13:28 +02:00
Darks d3980fd131
Added some comments 2019-06-06 01:06:46 +02:00
Lephe 8211183b5c templates: add a pluralize filter 2019-02-11 13:16:46 +01:00
Dark-Storm 584b1188d8
Grosses modifs sur le design. Ajout des routes /user 2019-02-05 23:21:46 +01:00
lephe 21e0679557 admin: start a panel with a database filler 2019-02-04 16:41:29 +01:00
Dark-Storm 46ac8fcd1f
Redefinition des formulaires 2019-02-03 16:52:42 +01:00
Dark-Storm 2f702ba97e
Redefinition des routes 2019-02-03 16:20:05 +01:00
lephe 0299354a02 db: Move to PostgreSQL to support migrations 2019-02-02 17:34:41 +01:00
Dark-Storm 16d846a4df
Django est mort, vive Flask ! 2018-02-23 23:34:06 +01:00