def district_list(request):
    districts = District.objects.all()
    districts = districts.annotate(school_count=Count('school', distinct=True))
    districts = districts.annotate(survey_count=Count('school__survey', distinct=True))

    return render_to_response('survey/district_list.html', locals(), context_instance=RequestContext(request))