添加提交

This commit is contained in:
xuyue committed 2025-03-18 19:16:32 +08:00
1 parent f84f34cc46
commit 55ef262ae8
13 files changed
+304 -44

No files matched your search

+4
View File
@@ -51,6 +51,10 @@ class Profile(models.Model):
def __str__(self):
return self.user.username
def update_total_score(self, score: int):
self.total_score = self.total_score + score
self.save()
@receiver(post_save, sender=User)
def create_user_profile(sender, instance, created, **kwargs):