def logout_user(sender, **kwargs): """ Legacy code Wraps logout signal to send deprecated "post_superuser_logout" signal """ user = kwargs['user'] if hasattr(user, 'id'): post_superuser_logout.send(sender=None, user_id=user.pk)
def logout_user(sender, **kwargs): ''' wraps logout signal ''' user = kwargs['user'] if hasattr(user, 'id'): post_superuser_logout.send(sender=None, user_id=user.pk)
def logout_user(sender, **kwargs): """ wraps logout signal """ user = kwargs["user"] if hasattr(user, "id"): post_superuser_logout.send(sender=None, user_id=user.pk)