(podcast_pk, user_pk)
unsubscribes user from the current podcast on all clients
unsubscribes user from the current podcast on all clients
unsubscribes user from the current podcast on all clients
def unsubscribe_all(podcast_pk, user_pk):
    """unsubscribes user from the current podcast on all clients"""
    podcast = Podcast.objects.get(pk=podcast_pk)

    User = get_user_model()
    user = User.objects.get(pk=user_pk)

    now = datetime.utcnow()
    clients = user.client_set.filter(subscription__podcast=podcast)

    # fully execute subscriptions, before firing events
    changed = list(_perform_unsubscribe(podcast, user, clients, now))
    _fire_events(podcast, user, changed, False)
def unsubscribe_all ( podcast_pk , user_pk ) : podcast = Podcast . objects . get ( pk = podcast_pk ) User = get_user_model ( ) user = User . objects . get ( pk = user_pk ) now = datetime . utcnow ( ) clients = user . client_set . filter ( subscription__podcast = podcast ) # fully execute subscriptions, before firing events changed = list ( _perform_unsubscribe ( podcast , user , clients , now ) ) _fire_events ( podcast , user , changed , False )