Flask Secret Santa
Simple flask webapp to collect names of people, randomize matches, and let people check who they got in a online secret santa pool.
Every year I do a secret santa within a group of friends. The biggest challenge is getting everyone together during the holiday season rush. That's why I created this simple (and I mean SIMPLE) flask webapp. Tried and tested, it worked great for our needs. Can it be improved? Sure, but this was written during a post Thanksgiving Day food coma. :) Hope this helps someone else out there!
- Setup Webserver of choice. For simplicity, I use httpd + mod_wsgi. I assume this setup throughout the rest of the README; feel free to try something else!
- Setup a user/group for the wsgi daemon process. For the example, I created a
jvasallo:jvasalloas the user:group on the OS.
- Create virtualenv with the user created in step 2, and
pip install -r requirements.txt
bash setup.shto create the base sqlite3 table schema. Feel free to change this to whatever DB technology you want.
- Check over the wsgi file to make sure all endpoints match that of your system. Namely, the venv path and the app path.
- Check the conf.d file and make sure it has all the right endpoints from the previous steps. Namely, the user:group, the webserver specific IPs/names, and path to the virtualenv.
- Start up your webserver with PROD Mode settings, open
santa.pyand change the main block to have PROD settings and comment out the debug settings.
/Root of webpage
/santaAllows new users to register their user/pass combo
/statusAllows users to check who they got.
/randomizerRandomizes matches of people in the secret santa pool to other random folks Note: It is up to the Secret Santa admin to call