diff --git a/fowl/game/templates/stables.html b/fowl/game/templates/league.html
similarity index 100%
rename from fowl/game/templates/stables.html
rename to fowl/game/templates/league.html
diff --git a/fowl/game/urls.py b/fowl/game/urls.py
index 554a911..81bde4a 100644
--- a/fowl/game/urls.py
+++ b/fowl/game/urls.py
@@ -1,12 +1,12 @@
from django.conf.urls import patterns, url
urlpatterns = patterns('',
- url(r'events/(?P\d+)/$', 'fowl.game.views.events',
- name='events'),
url(r'league/(?P\d+)/$', 'fowl.game.views.league',
name='league'),
+ url(r'league/(?P\d+)/events/$', 'fowl.game.views.events',
+ name='events'),
+ url(r'^league/(?P\d+)/roster/$', 'fowl.game.views.roster',
+ name='roster'),
url(r'^edit_event/(?P\d+|new)/$', 'fowl.game.views.edit_event',
name='edit_event'),
- url(r'^roster/(?P\d+)/$', 'fowl.game.views.roster',
- name='roster'),
)
diff --git a/fowl/game/views.py b/fowl/game/views.py
index eb1bf75..6dabbcf 100644
--- a/fowl/game/views.py
+++ b/fowl/game/views.py
@@ -85,12 +85,11 @@ def league(request, league_id):
'league': league,
'leagues': leagues
}
- teams = list(Team.objects.filter(league__id=league_id)
- .prefetch_related('stars'))
+ teams = list(Team.objects.filter(league__id=league_id))
context['teams'] = teams
context['star_sets'] = izip_longest(*(team.stars.all().order_by("division")
for team in teams))
- return render(request, "stables.html", context)
+ return render(request, "league.html", context)
def roster(request, league_id):