ahgl/ahgl-site — pull request #126 by tumanyanani (2014-12-08 23:31:31+00:00)
Title: Feature/generalize character selection

DO NOT MERGE THIS PR WITH MASTER

NOTE: This PR contains code that might break other parts of the system, as it hasn't been finished yet.

Based on the #125 feature we have the following tasks:

Task 1 (DONE): Add new fields to the api.Game model.
'Character Selection Display Name' of both fields (e.g. 'Home Race', 'Away Race)
'Character Selection Options' users can select from (this is a list of strings)
'Number of Character Selections' - the number of items that must be selected

Task 2 (DONE): Alter the home_race and away_race in tournament.Game to allow to select more than one race.

Task 3 (DONE): For the frontend match page (e.g. http://afterhoursgaming.tv/starcraft-2-season-5/matches/2080/), it currently has special logic to take the Home and Away Race and post things like 'TvP' that depend on both selections. Simply remove this code, and don't display anything related to this field on the frontend match page.

Task 4 (DONE): For the player admin: http://afterhoursgaming.tv/player_admin/ page, display all selectied option, comma separated.

Task 5 (SOMEWHAT DONE): Use the api.game.home_character_display_name and api.Game.away_character_display_name to make the headers of tournaments.game.home_race and tournaments.game.away_race field headers dynamic.

Task 6 and 7 (NOT DONE): Add validation based on the api.game.number_of_character_selection number to force users to select exact number of races for home and away race fields in the ADMIN and FRONTEND pages.