Commit Graph

44 Commits

Author SHA1 Message Date
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 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 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 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
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 ff21d89c23
Small modifications 2019-08-09 23:20:53 +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 43264d9de1 account: small trophy improvements on #10 2019-06-07 13:48:28 -04: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
Darks 79e3189f4b
First draw for trophies 2019-06-06 23:24:14 +02:00
Lephe a3b867bab5 core: introduce a master script and enable proper privilege checks 2019-06-06 13:54:01 -04:00
Lephe 8570b8660f account: introduce normalized names
Adds a normalized name field to the user record. Also uses
normalized names conflicts to deny new user names.
2019-06-05 20:01:12 -04:00
Lephe 21ebfb7d2a account: remove innovation counter, use only xp 2019-06-05 16:42:32 -04:00
Darks a09cfd37b5 Quelques changements pour respecter la PEP8
Ajout d'un CoC Don't Be An Asshole.
2019-06-05 01:44:38 +02:00
Lephe bc7580de25 account: implement leveling and a simple profile widget 2019-05-03 13:40:20 +02:00
Lephe 725e768520 groups: move default group data to a suitable place 2019-02-16 17:12:41 +01:00
Dark-Storm 0c4f0f6748
Modifications en vrac
Dans User.valid_name, ajout de caractères non autorisés. Voir #19 pour
faire quelque chose de vraiment propre et safe.
Dans privs, j'ai shooté des règles en double. Répercussion sur les
autres routes.
Ajout du champ username dans le formulaire admin de modif d'un compte.
2019-02-11 00:15:09 +01:00
Lephe 834403038b privs: add methods to properly delete users and groups 2019-02-10 18:51:53 +01:00
Lephe 7921bb5765 privs: create privileges from groups and users
The groups-privileges page takes care of removing privileges
before deleting groups and users; this is to be moved soon to a
proper group/user deletion API.
2019-02-10 15:46:53 +01:00
lephe 9fe1104b45 admin: more on user and group generation
Also more titles and details on other pages of
the administration section.
2019-02-09 21:18:12 +01:00
lephe 9faabea997 templates: slightly restructure and improve design 2019-02-09 11:32:08 +01:00
lephe 07a685f3c4 header: place elements as discussed with @Dark-Storm 2019-02-08 21:14:25 +01:00
lephe d33b90aff2 privs: fix #14 (rebased from work by @Dark-Storm) 2019-02-08 19:13:26 +01:00
Dark-Storm 62729e6058
Ajouts dans le panel admin 2019-02-06 13:12:03 +01:00
Dark-Storm 936d0e2e8e
Correction du ticket #15 2019-02-06 10:20:47 +01:00
Dark-Storm 584b1188d8
Grosses modifs sur le design. Ajout des routes /user 2019-02-05 23:21:46 +01:00
Dark-Storm cd533a4ea3
Ajout d'un décorateur @priv_required 2019-02-05 11:30:39 +01:00
Dark-Storm 2089a09753
Ajout du support des avatars. Y'a un peu de nettoyage sur le chemin de stockage 2019-02-04 23:21:29 +01:00
lephe 21e0679557 admin: start a panel with a database filler 2019-02-04 16:41:29 +01:00
lephe 98def3a302 privs: Document the core privileges 2019-02-03 15:40:37 +01:00
lephe 6affd025b8 privs: start working on groups and privileges 2019-02-03 15:00:59 +01:00
lephe 2311c7f3d8 users: review code and expand a little
Nothing ground-breaking here, but lays the ground for
later expansions.
2019-02-03 11:12:01 +01:00
lephe 0299354a02 db: Move to PostgreSQL to support migrations 2019-02-02 17:34:41 +01:00
Dark-Storm 04c2bd50c4
Avancées sur la page de modification du profil 2018-11-16 23:15:43 +01:00
Dark-Storm 2ebcf5e1ec
Modifications générales du style, finalisation du formulaire d'inscritpion 2018-11-12 23:27:49 +01:00
Dark-Storm 0c015158ce
WIP on design & models 2018-11-01 21:01:05 +01:00
Dark-Storm 1066c776cd
WIP on models 2018-09-29 23:51:45 +02:00