(podcast_pk, user_pk, ref_url=None)
subscribes user to the current podcast on all clients
subscribes user to the current podcast on all clients
subscribes user to the current podcast on all clients
def subscribe_all(podcast_pk, user_pk, ref_url=None):
    """subscribes user to the current podcast on all clients"""
    podcast = Podcast.objects.get(pk=podcast_pk)

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

    ref_url = ref_url or podcast.url
    now = datetime.utcnow()
    clients = user.client_set.all()

    # fully execute subscriptions, before firing events
    changed = list(_perform_subscribe(podcast, user, clients, now, ref_url))
    _fire_events(podcast, user, changed, True)
def subscribe_all ( podcast_pk , user_pk , ref_url = None ) : podcast = Podcast . objects . get ( pk = podcast_pk ) User = get_user_model ( ) user = User . objects . get ( pk = user_pk ) ref_url = ref_url or podcast . url now = datetime . utcnow ( ) clients = user . client_set . all ( ) # fully execute subscriptions, before firing events changed = list ( _perform_subscribe ( podcast , user , clients , now , ref_url ) ) _fire_events ( podcast , user , changed , True )