diff --git a/fowl/game/templates/base.html b/fowl/game/templates/base.html index 76b03a8..96fea23 100644 --- a/fowl/game/templates/base.html +++ b/fowl/game/templates/base.html @@ -17,11 +17,12 @@ .match-notes { font-size: 80%; color: #999999; } .belt-img img { display: block; margin-left: auto; margin-right: auto } .raw { float: right; margin-right:12em; background-color: #900000;} - .divas { float: right; margin-right:11em; background-color: #900099;} + .divas { float: right; margin-right:11em; background-color: #900099;} .smackdown { float: right; margin-right:8em; background-color: #003090;} .other { float: right; margin-right:11em; } .score-container { float: right; margin-right:20em;} .nav { font-size: 120%; padding: 4px 0px;} + .matchform { border: 1px solid black; } @@ -78,6 +79,8 @@ + {% block extrascript %} {% endblock %} + -
-

Match #{{forloop.counter}}

- - - {% for team in match.teams %} - - - {% for member in team %} - +
+

Match

+
team #{{forloop.counter}} -
+ + {% for team in match.teams %} + + + {% for member in team %} + + {% endfor %} + {% endfor %} - + +
team #{{forloop.counter}} +
+ + - {% for val, name in OUTCOMES %} - - {% endfor %} - - - - - -
- - -
- - - - + + + + + +
+ + +
+ + + + {% endfor %} - +
- + {% csrf_token %}
diff --git a/fowl/game/views.py b/fowl/game/views.py index 9f42a4f..977278d 100644 --- a/fowl/game/views.py +++ b/fowl/game/views.py @@ -50,10 +50,13 @@ def edit_event(request, event): 'teams': [], }) - for k,v in request.POST.iterlists(): + for k, team in request.POST.iterlists(): if k.startswith('members'): - _, match, team = k.split('-') - edict['matches'][int(match)-1]['teams'].append(v) + _, match, _ = k.split('-') + # remove empty strings from team + team = [m for m in team if m] + if team: + edict['matches'][int(match)-1]['teams'].append(team) event = Event.from_dict(edict) # score the event for all active leagues diff --git a/makedb.sh b/makedb.sh old mode 100644 new mode 100755