A booking system for the yearly event Allaktivitetsdag at Tullinge gymnasium.
Demo site at booking.tullingelabs.se
requirements.txt
, can be installed using pip install -r requirements.txt
)These environment variables need to be set (except the ones which have defaults) before either running the application locally or building the Docker container (deployment).
REDIS_HOST
- default is localhost
MYSQL_HOST
- default is localhost
MYSQL_USER
- default is admin
MYSQL_PASSWORD
- default is do-not-use-in-production
(override this in production!)MYSQL_DATABASE
- default is booking
GOOGLE_CLIENT_ID
- must be set manually, used for communicating with Google API.GSUITE_DOMAIN_NAME
- must be set manually, used for limiting logins to a specific G Suite organizationPORT
- must be set manually, if using Docker deploymentdocker-compose up -d
python scripts/setup_db.py
python scripts/create_admin.py
python main.py
DOCKER_HOST
and MYSQL_PASSWORD
docker-compose -f prod.yml up -d
docker exec booking_app_1 python scripts/setup_db.py
docker exec -it booking_app_1 python scripts/create_admin.py
/
)
/admin
)
/leader
)
Once you got the webserver running and an initial admin account created, you can log in to the admin interface by visiting /admin
.
Once logged in, go ahead and click Aktiviteter
to create a new activity. From each activity, you can create questions that the students have to answer when choosing the activity.
You can also add email addresses to activity leaders who should have access class lists for a specific activity. Leaders can access the interface by visiting /leader
and signing in with their Google accounts (as specified when the admin grants privileges).
Then you can move on to the Klasser
page, where you can create school classes that will be shown to the students when they initially set up their accounts. A join code will also be generated which is used by the students when initially signing up (when the student enters the code they will be registered to that class).
Students sign in using Google, which makes authentication a lot smoother. The system fetches the first name and surname of the user using information from Google. The student just has to type in the 8 digit code to be registered to the class. From the interface, the student can browser activities, book activities and re-book activities.
Feel free to open an issue or send in a pull request. All code should be formatted using black. This project uses the semantic versioning convention, see CHANGELOG.md for more information.