~daker/loco-team-portal/fix.806005

« back to all changes in this revision

Viewing changes to loco_directory/teams/views.py

  • Committer: Tarmac
  • Author(s): Michael Hall
  • Date: 2011-07-12 00:01:18 UTC
  • mfrom: (447.1.1 speed-up-teams-list)
  • Revision ID: tarmac@nigelb.me-20110712000118-rqg3orkxbx9p28bk
[r=chrisjohnston][] Reduces the number of DB hits and code process for the teams list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    return response
66
66
 
67
67
def team_list(request):
68
 
    team_list = Team.objects.all().order_by('name')
69
68
    
70
69
    context = {
71
 
        'team_list': team_list,
72
70
        'continents': Continent.objects.all().order_by('name'),
73
71
        'countries_without_continent': countries_without_continent().order_by('name'),
74
72
        'countries_without_continent_have_teams': countries_without_continent_have_teams(),