Skip to content

Commit 80f51c4

Browse files
committed
add execution time in submission model
1 parent 58c4b4c commit 80f51c4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

options/options.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ class OptionKeys:
107107

108108
class OptionDefaultValue:
109109
website_base_url = "http://127.0.0.1"
110-
website_name = "Online Judge"
111-
website_name_shortcut = "oj"
112-
website_footer = "Online Judge Footer"
110+
website_name = "OpenNetLab"
111+
website_name_shortcut = "onl"
112+
website_footer = ""
113113
allow_register = True
114114
submission_list_show_all = True
115115
smtp_config = {}

submission/models.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ class Submission(models.Model):
2525
create_time = models.DateTimeField(auto_now_add=True)
2626
user_id = models.CharField(db_index=True, max_length=50)
2727
username = models.TextField()
28+
language = models.TextField()
2829
code_list = models.JSONField(default=list)
2930
server_list = models.JSONField(default=list)
3031
ports_list = models.JSONField(default=dict)
3132
result = models.IntegerField(db_index=True, default=JudgeStatus.PENDING)
3233
grade = models.IntegerField(default=0)
3334
failed_info = JSONField(default=list)
34-
language = models.TextField()
3535
shared = models.BooleanField(default=False)
3636
ip = models.TextField(null=True)
37+
execution_time = models.FloatField(default=0.0)
3738

3839
def check_user_permission(self, user, check_share=True):
3940
if (

0 commit comments

Comments
 (0)