This repository has been archived on 2022-05-05. You can view files and clone it, but cannot push or open issues or pull requests.
userausfall/userausfall/signals.py

11 lines
380 B
Python
Raw Normal View History

from django.db.models.signals import post_save
from django.dispatch import receiver
from userausfall.models import AccountRequest
@receiver(post_save, sender=AccountRequest)
def account_request_saved(sender, instance: AccountRequest, **kwargs):
if instance.is_verified and instance.is_trustable and instance.username:
print('Create account and send password mail')