This commit adds most of the optional metadata for programs. The event
related to the program's publication is an actual relationship to an
Event model. The idea is to expand on that model in the future to
include:
- A link to the event's main topic
- List of programs published in the event
- Possibly, a list of all related topics (announcement, start, results,
etc) all sharing a common 1-line header so they are linked together
- This would be used for event-related trophies
- And possibly for an event calendar
* 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
Adds the tagging system, with 3 types of tags:
* Calculator models grouped by compatibility classes
* Programming languages
* Game, tools, and course categories
[MIGRATION] This commit contains a new version of the schema.
[BREAKS] This commit breaks existing tag assignments.
[MASTER] Run the 'update-tags' command of master.py.
Also added is_default_accessible() to Thread class as its owner may be a
Topic with forum access restrictions or public main content (like
Program)
[MIGRATION] This commit contains a new version of the schema. /!\ This
migration breaks all attachments
This is useful to quickly browse a list of polymorphic Posts for topics,
programs, etc. The main application is from Member.posts, since
polymorphic collection seems both difficult and edgy.
[MIGRATION] This commit contains a new version of the schema.
Not tested yet since there is a lack of tools to manipulate comments,
topics and programs. The /programmes routes is used to display a list of
all programs, temporarily.
- Pour les commentaires seulement
- Ajout d'une option pour désactiver (antispam)
- Penser à faire les ACL rapidement…
- Un poil de CSS pour l'intégration du bouzin
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.
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.
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.
- 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`