7 lines
219 B
Python
7 lines
219 B
Python
|
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()
|