Merge branch 'master' of github.com:jamesturk/fowl
This commit is contained in:
commit
8d2ad2bed2
@ -11,16 +11,27 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Stars</th>
|
||||
<th>Raw</th>
|
||||
<th>Smackdown</th>
|
||||
<th>Divas</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for star in stars %}
|
||||
{% for star_set in star_sets %}
|
||||
<tr>
|
||||
<td>{{star}}<span class="label {{star.division}}">{{star.division}}</span></td>
|
||||
{% for star in star_set %}
|
||||
<td>{{star}}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>Others</h2>
|
||||
<ul>
|
||||
{% for other in others %}
|
||||
<li>{{other}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -159,10 +159,11 @@ def roster(request, league_id):
|
||||
divisions = {'raw': [], 'smackdown': [], 'other': [], 'divas': []}
|
||||
for star in Star.objects.all():
|
||||
divisions[star.division].append(star)
|
||||
stars = izip_longest(divisions['raw'], divisions['smackdown'],
|
||||
divisions['divas'], divisions['other'])
|
||||
star_sets = izip_longest(divisions['raw'], divisions['smackdown'],
|
||||
divisions['divas'], fillvalue='')
|
||||
context = {
|
||||
'stars': stars,
|
||||
'star_sets': star_sets,
|
||||
'others': divisions['other'],
|
||||
'view': 'roster',
|
||||
'league': league,
|
||||
'leagues': leagues
|
||||
|
Loading…
Reference in New Issue
Block a user