-
Notifications
You must be signed in to change notification settings - Fork 0
Stuff to change every year
make a new TeamData.csv with at least these columns (can be done with a join, or manually):
- Name - team name
- School - team's school
- Abbr - team name abbreviation
- Email - captain's email
- Captain Name - captain's name
- Manually add them through the Django admin site
url: /admin/. This is easiest, but the data will disappear if you remove the docker volume. This is not good if you are making any changes or doing any development, since you may have to remigrate the db. - Update the migration file:
team_management/migrations/team_management/0002.....pyThis is the best option, since the data is stored in a persistent file.
Anything that is scored must be in here, regardless of whether or not it belongs on the judging screen.
edit team_management/templates/team_management/GameX.html and team_management/views.py.
views.py sends lists of model objects, which act like dictionaries, to the template renderer to insert into the html. Using input_style in the ScoringType model, you can have views.py query different things in different groups. Then you can copy/paste different sections of GameX.html to insert those groups into.
Also remove any superfluous html from the page, like the Potion Recipes from 2020.
edit team_management/models.py
under GameParticipant edit switcher and add def <name of scoringType>. I recommend following the format of brewPotion from 2020. For each time they score, it calculates what it is worth with a simple formula, and then multiplies it by the multiplier. You can get more complicated with if statements or anything you want.