11 lines
380 B
Python
11 lines
380 B
Python
|
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')
|