add achievements field to user model

This commit is contained in:
Timur
2025-03-02 15:17:38 +03:00
parent b631b09648
commit 05f8300976
4 changed files with 44 additions and 1 deletions
+4
View File
@@ -1,6 +1,7 @@
from django.contrib.auth.hashers import check_password, make_password
from django.db import models
from apps.achievement.models import Achievement
from apps.core.models import BaseModel
@@ -16,6 +17,9 @@ class User(BaseModel):
created_at = models.DateTimeField(auto_now=True)
achievements = models.ManyToManyField(Achievement, blank=True,
verbose_name="ачивки пользователя")
@staticmethod
def make_password(password: str):
return make_password(password)