WarwickTabletop / tgrsite

Warwick Tabletop Games and Role-Playing Society's website.
http://warwicktabletop.co.uk
ISC License
0 stars 2 forks source link

Display latest minutes and newsletter on sidebar #312

Open finnbar opened 2 years ago

finnbar commented 2 years ago

(This is a request from Ares which I've added exact implementation details to.)

It'd be good to have the latest minutes and newsletter available on the sidebar of the website, rendered something like:

See the latest newsletter: <title, which links to that newsletter>!
Go to the latest meeting minutes: <title, which links to those minutes>.

(Rendering is of course your choice and you can experiment with it.)

Since the homepage is a static page (using the pages app), the best way to add this kind of functionality would be as a widget, which allows you to add non-static content to static pages. We currently have two widgets that you might find helpful to look at, whose implementations are available in this folder. You'll then have to add it to the enum found in pages/models.py and update the file that renders widgets. This may also require you to define something similar to event_tags or timetable_tags, which are in timetable/templatetags, but could be put in any app's templatetags directory.

This should hopefully be not too bad given that it should be a database query to find the title and URL of the newsletter, and the title and URL of the minutes, and then present that with some nice Django templating. But of course, any questions can be posted here or in #computers-were-a-mistake on the society Discord.