expephalon-smsotp/core/receivers/profiles.py

7 lines
219 B
Python
Raw Normal View History

from django.db.models.signals import post_delete
from core.models.profiles import AdminProfile
@receiver(post_delete, sender=AdminProfile)
def delete_user(sender, instance, *args, **kwargs):
instance.user.delete()