Skip to content

Instantly share code, notes, and snippets.

@andymboyle
Created March 7, 2011 18:02
Show Gist options
  • Save andymboyle/858896 to your computer and use it in GitHub Desktop.
Save andymboyle/858896 to your computer and use it in GitHub Desktop.
view.py for class
@cache_control(public=True, max_age=300)
def recruiting_year(request, yslug):
year = RecruitClass.objects.get(year_slug=yslug)
recruiting_year = 1
years = RecruitClass.objects.all().order_by('year')
player = Recruit.objects.filter(college_class__year_slug=yslug).filter(Q(signing_day_pick_school__school__short_name="Florida")|Q(verbal_commit_pick_school__school__short_name="Florida")).filter(Q(committed_status__status="Signed")|Q(committed_status__status="Verbal")).order_by('last_name')
return render_to_response('year_detail.html', {
'player': player,
'year': year,
'years': years,
'recruit_year': recruiting_year,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment