mirror of
https://github.com/TurTaskProject/TurTaskWeb.git
synced 2025-12-19 22:14:07 +01:00
9 lines
296 B
Python
9 lines
296 B
Python
from django.db.models.signals import post_save
|
|
from django.dispatch import receiver
|
|
|
|
from users.models import CustomUser, UserStats
|
|
|
|
@receiver(post_save, sender=CustomUser)
|
|
def create_user_stats(sender, instance, created, **kwargs):
|
|
if created:
|
|
UserStats.objects.create(user=instance) |