added roster
This commit is contained in:
parent
905e1ff14a
commit
c8556194cc
26
fowl/game/templates/roster.html
Normal file
26
fowl/game/templates/roster.html
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
{% block title %} Roster {% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<header class="jumbotron subhead" id="overview">
|
||||||
|
<h1>Roster</h1>
|
||||||
|
<p class="lead">The WWE Roster</p>
|
||||||
|
</header>
|
||||||
|
<br><br><br>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Stars</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for star in stars %}
|
||||||
|
<tr>
|
||||||
|
<td>{{star}}<span class="label {{star.division}}">{{star.division}}</span></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -6,4 +6,5 @@ urlpatterns = patterns('',
|
|||||||
url(r'league/(?P<league_id>\d+)/$', 'fowl.game.views.league',
|
url(r'league/(?P<league_id>\d+)/$', 'fowl.game.views.league',
|
||||||
name='league'),
|
name='league'),
|
||||||
url(r'^edit_event/$', 'fowl.game.views.edit_event', name='edit_event'),
|
url(r'^edit_event/$', 'fowl.game.views.edit_event', name='edit_event'),
|
||||||
|
url(r'^roster/$', 'fowl.game.views.roster', name='roster'),
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from itertools import izip_longest
|
from itertools import izip_longest
|
||||||
from django.shortcuts import render, get_object_or_404
|
from django.shortcuts import render, get_object_or_404
|
||||||
from fowl.game.models import Team, TeamPoints
|
from fowl.game.models import Team, TeamPoints, Star
|
||||||
|
|
||||||
|
|
||||||
def events(request, league_id):
|
def events(request, league_id):
|
||||||
@ -29,7 +29,6 @@ def edit_event(request, event_id=None):
|
|||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
return render(request, "edit_event.html", {"event": event})
|
return render(request, "edit_event.html", {"event": event})
|
||||||
|
|
||||||
|
|
||||||
def league(request, league_id):
|
def league(request, league_id):
|
||||||
context = {
|
context = {
|
||||||
'view': 'league',
|
'view': 'league',
|
||||||
@ -41,3 +40,9 @@ def league(request, league_id):
|
|||||||
context['star_sets'] = izip_longest(*(team.stars.all().order_by("division")
|
context['star_sets'] = izip_longest(*(team.stars.all().order_by("division")
|
||||||
for team in teams))
|
for team in teams))
|
||||||
return render(request, "stables.html", context)
|
return render(request, "stables.html", context)
|
||||||
|
|
||||||
|
def roster(request):
|
||||||
|
context = {
|
||||||
|
'stars': Star.objects.all()
|
||||||
|
}
|
||||||
|
return render(request, "roster.html", context)
|
Loading…
Reference in New Issue
Block a user