include state in team detail context vars

This commit is contained in:
James Tauber 2012-08-01 22:28:57 -04:00
parent 3998fe3369
commit 4f888ffd57

View file

@ -9,9 +9,11 @@ from symposion.teams.models import Team
@login_required @login_required
def team_detail(request, slug): def team_detail(request, slug):
team = get_object_or_404(Team, slug=slug) team = get_object_or_404(Team, slug=slug)
if team.access == "invitation" and team.get_state_for_user(request.user) is None: state = team.get_state_for_user(request.user)
if team.access == "invitation" and state is None:
raise Http404() raise Http404()
return render(request, "teams/team_detail.html", { return render(request, "teams/team_detail.html", {
"team": team, "team": team,
"state": state,
}) })