(user, only_public=False)
return podcasts
Returns all subscribed podcasts for the user

    The attribute "url" contains the URL that was used when subscribing to
    the podcast
Returns all subscribed podcasts for the user
Returns all subscribed podcasts for the user
def get_subscribed_podcasts(user, only_public=False):
    """Returns all subscribed podcasts for the user

    The attribute "url" contains the URL that was used when subscribing to
    the podcast"""

    # django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
    from mygpo.subscriptions.models import Subscription, SubscribedPodcast

    subscriptions = (
        Subscription.objects.filter(user=user)
        .order_by("podcast")
        .distinct("podcast")
        .select_related("podcast")
    )

    # django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
    from mygpo.usersettings.models import UserSettings

    private = UserSettings.objects.get_private_podcasts(user)

    podcasts = []
    for subscription in subscriptions:
        podcast = subscription.podcast
        public = subscription.podcast not in private

        # check if we want to include this podcast
        if only_public and not public:
            continue

        subpodcast = SubscribedPodcast(podcast, public, subscription.ref_url)
        podcasts.append(subpodcast)

    return podcasts
def get_subscribed_podcasts ( user , only_public = False ) : # django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. from mygpo . subscriptions . models import Subscription , SubscribedPodcast subscriptions = ( Subscription . objects . filter ( user = user ) . order_by ( "podcast" ) . distinct ( "podcast" ) . select_related ( "podcast" ) ) # django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. from mygpo . usersettings . models import UserSettings private = UserSettings . objects . get_private_podcasts ( user ) podcasts = [ ] for subscription in subscriptions : podcast = subscription . podcast public = subscription . podcast not in private # check if we want to include this podcast if only_public and not public : continue subpodcast = SubscribedPodcast ( podcast , public , subscription . ref_url ) podcasts . append ( subpodcast ) return podcasts