This branch is for the 2022 room ballot.
The 2021/20 codebases live on in the 2021
and the 2020
branches respectively.
In previous years, the JCR has collected syndicates and room preference data. However, as of 2022, we agreed that the College should be responsible for collecting data, for privary purposes. This site therefore acts as an information hub regarding the ballot, including:
- key links
- room allocations
- information about how the ballot algorithm is run
You probably want to do this with a virtualenv
. For a simple development environment:
$ python3 -m venv venv
$ . env.sh
(venv) $ pip3 install -r requirements.txt
(venv) $ mkdir instance
(venv) $ cp config.default.py instance/config.py
(venv) $ flask init-db
(venv) $ flask import-users
(venv) $ flask run
init-db
initialises the database according toroomsurvey/schema.sql
.import-users
imports theusers.csv
file into the database. This file can be generated using the ucam-lookup-byyear script.import-allocations
imports room allocation data from theallocations.csv
file produced by the room selection program. This is required in order to get room reviews.send-review-reminder
queues an email to be sent to everyone who has been allocated a room. Seeroomsurvey/mail.py
for more information.send-survey-reminder
queues an email to be sent to everyone who is part of syndicate in which one or more member(s) has not completed the preferences form. (good for peer pressure)send-emails
sends any queued emails, and should be run by cron in production. Only sending via the local mail server is supported at the moment.
All the routes of the web-app are defined in roomsurvey/__init__.py
. Reading this file will give you a
quick overview of the app's architecture.
Hint: you might want to take note of who has permission to read instance/db.sqlite
and
instance/config.py
. These files tend to contain sensitive information in production.
Lawrence Brown, JCR Internet Officer 2020/21
MIT, please see the LICENSE
file for more information.