Repository navigation
feat(events): manage events from an admin page instead of code - #113
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app/data/events.pylist into aneventstable (bindusers, created bydb.create_all()on start). The home page, /events, event pages, the feedback form and the notification tool read from it throughapp/events_store.py, which returns the same dict shape, so the public templates did not change/events/admin/manage(linked from the admin menu and profile): dates as real start and end dates, description, highlights, image upload or link, and the usual links. Input is validated, uploads are checked like the notification images and stored instatic/uploads/events/(kept bydeploy.sh), and every change needs a CSRF tokenflask import-eventscopies the old list (nowapp/data/events_seed.py) into the table once; it is safe to repeat. Older irregular dates such as "Oct 4th - Oct 5th, 2024" now read like the rest ("October 4 - 5, 2024"), and one broken relative image link is fixedSQLITE_DIR) instead of the locallocal_*.dbfilesAfter deploying, run
FLASK_APP=app flask import-eventsonce on the server, or the event sections stay empty.