Skip to content

Commit d288983

Browse files
added contest model to teams display context
1 parent 9b486e2 commit d288983

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ def teams(request):
9797

9898
context = {}
9999

100+
# Get contest object or set to None
101+
context['contest'] = cache.get_or_set(
102+
'contest_model', Contest.objects.first(), CACHE_TIMEOUT)
103+
100104
teams_set = Team.objects.all()
101105
participants_set = Profile.objects.all()
102106

0 commit comments

Comments
 (0)