(request, username)
return JsonResponse(lists_data)
Returns a list of all podcast lists by the given user
Returns a list of all podcast lists by the given user
Returns a list of all podcast lists by the given user
def get_lists(request, username):
    """Returns a list of all podcast lists by the given user"""

    User = get_user_model()
    user = User.objects.get(username=username)
    if not user:
        raise Http404

    lists = PodcastList.objects.filter(user=user)

    site = RequestSite(request)

    get_data = partial(_get_list_data, username=user.username, domain=site.domain)
    lists_data = list(map(get_data, lists))

    return JsonResponse(lists_data)
def get_lists ( request , username ) : User = get_user_model ( ) user = User . objects . get ( username = username ) if not user : raise Http404 lists = PodcastList . objects . filter ( user = user ) site = RequestSite ( request ) get_data = partial ( _get_list_data , username = user . username , domain = site . domain ) lists_data = list ( map ( get_data , lists ) ) return JsonResponse ( lists_data )