fixed problem with generating random nickname.

This commit is contained in:
puckoprutt 2025-03-01 15:44:15 +01:00
parent 257c62484e
commit 478456da15

View File

@ -7,10 +7,10 @@ from django.dispatch import receiver
from django.db.models.signals import post_save from django.db.models.signals import post_save
def _create_unique_string(): def _create_unique_string():
time = f"pucko {timezone.now} prutt" time = f"pucko {timezone.now()} prutt"
m = hashlib.blake2s() m = hashlib.blake2s()
m.update(str.encode(time)) m.update(str.encode(time))
return m.hexdigest()[16:52] return m.hexdigest()[16:52]
class User_Profile(models.Model): class User_Profile(models.Model):