We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 869b2e7 commit 25a825dCopy full SHA for 25a825d
account/models.py
@@ -79,6 +79,7 @@ class UserProfile(models.Model):
79
major = models.TextField(null=True)
80
language = models.TextField(null=True)
81
# for Contest
82
+ total_submissions = models.IntegerField(default=0)
83
accepted_number = models.IntegerField(default=0)
84
total_score = models.IntegerField(default=0)
85
submission/views/user.py
@@ -137,6 +137,7 @@ def post(self, request):
137
assert user
138
profile = UserProfile.objects.get(user=user)
139
assert profile
140
+ profile.total_submissions += 1
141
if problem._id not in profile.problems_status:
142
profile.problems_status[problem._id] = score
143
profile.total_score += score
0 commit comments