Skip to content

Commit

Permalink
Make hot problems count a setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjaclasher authored and Xyene committed May 10, 2020
1 parent ca21a0c commit 79016fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dmoj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
DMOJ_PROBLEM_MIN_MEMORY_LIMIT = 0 # kilobytes
DMOJ_PROBLEM_MAX_MEMORY_LIMIT = 1048576 # kilobytes
DMOJ_PROBLEM_MIN_PROBLEM_POINTS = 0
DMOJ_PROBLEM_HOT_PROBLEM_COUNT = 7
DMOJ_RATING_COLORS = True
DMOJ_EMAIL_THROTTLING = (10, 60)
DMOJ_STATS_LANGUAGE_THRESHOLD = 10
Expand Down
2 changes: 1 addition & 1 deletion judge/views/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def get_context_data(self, **kwargs):
context.update(self.get_sort_paginate_context())
if not self.in_contest:
context.update(self.get_sort_context())
context['hot_problems'] = hot_problems(timedelta(days=1), 7)
context['hot_problems'] = hot_problems(timedelta(days=1), settings.DMOJ_PROBLEM_HOT_PROBLEM_COUNT)
context['point_start'], context['point_end'], context['point_values'] = self.get_noui_slider_points()
else:
context['hot_problems'] = None
Expand Down

0 comments on commit 79016fa

Please sign in to comment.