@@ -70,33 +70,15 @@ class Meta:
70
70
71
71
class UserProfile (models .Model ):
72
72
user = models .OneToOneField (User , on_delete = models .CASCADE )
73
- # Task_problems_status examples:
74
- # {
75
- # "problems": {
76
- # "1": {
77
- # "status": JudgeStatus.ACCEPTED,
78
- # "Score:" 80,
79
- # "passed test case": [1, 2],
80
- # "_id": "1000"
81
- # }
82
- # },
83
- # "contest_problems": {
84
- # "1": {
85
- # "status": JudgeStatus.Error,
86
- # "Score:" 80,
87
- # "passed test case": [1, 2],
88
- # "_id": "1000"
89
- # }
90
- # }
91
- # }
73
+ # dict of problem.id:max_grade
92
74
problems_status = JSONField (default = dict )
93
75
real_name = models .TextField (null = True )
94
76
blog = models .URLField (null = True )
95
77
github = models .TextField (null = True )
96
78
school = models .TextField (null = True )
97
79
major = models .TextField (null = True )
98
80
language = models .TextField (null = True )
99
- #for Contest
81
+ # for Contest
100
82
accepted_number = models .IntegerField (default = 0 )
101
83
total_score = models .IntegerField (default = 0 )
102
84
@@ -109,4 +91,4 @@ def add_score(self, this_time_score, last_time_score=None):
109
91
self .total_score = models .F ("total_score" ) - last_time_score + this_time_score
110
92
self .save ()
111
93
class Meta :
112
- db_table = "user_profile"
94
+ db_table = "user_profile"
0 commit comments