Skip to content

Commit

Permalink
feat: add default time limit and points when creating new problem
Browse files Browse the repository at this point in the history
  • Loading branch information
LLaammTTeerr committed Jun 25, 2024
1 parent 48af420 commit 6647b97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions judge/views/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,9 @@ def get_initial(self):
initial = super(ProblemCreate, self).get_initial()
initial = initial.copy()
initial['description'] = misc_config(self.request)['misc_config']['description_example']
initial['time_limit'] = 1
initial['memory_limit'] = 262144 # 256 MB
initial['points'] = 800
initial['partial'] = True
try:
initial['group'] = ProblemGroup.objects.get(name='Uncategorized').pk
Expand Down

0 comments on commit 6647b97

Please sign in to comment.