Add related problems

This commit is contained in:
cuom1999 2023-01-27 19:15:37 -06:00
parent 03455fca2c
commit ca13ee4e8d
7 changed files with 116 additions and 84 deletions

View file

@ -76,6 +76,7 @@ from judge.utils.problems import (
hot_problems,
user_attempted_ids,
user_completed_ids,
get_related_problems,
)
from judge.utils.strings import safe_float_or_none, safe_int_or_none
from judge.utils.tickets import own_ticket_filter
@ -352,6 +353,10 @@ class ProblemDetail(
else:
context["fileio_input"] = None
context["fileio_output"] = None
if not self.in_contest:
context["related_problems"] = get_related_problems(
self.profile, self.object
)
return context