mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 17:57:10 +00:00
add achievements field to user model
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user