From 6647b975ae122ef4cf27c82e67532f0db15741ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phan=20B=C3=ACnh=20Nguy=C3=AAn=20L=C3=A2m?= <76941117+LLaammTTeerr@users.noreply.github.com> Date: Wed, 26 Jun 2024 06:44:26 +0700 Subject: [PATCH] feat: add default time limit and points when creating new problem --- judge/views/problem.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/judge/views/problem.py b/judge/views/problem.py index 3f810356..5a5c5f8e 100755 --- a/judge/views/problem.py +++ b/judge/views/problem.py @@ -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