You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# trying to lists all user uploaded videos in my channel
# If user is not authenticated and username is None, raise an error
if username is None and not request.user.is_authenticated():
from django.http import HttpResponse
return HttpResponse404
# loop through the videos of the user
api = Api()
api.authenticate()
videos = api.fetch_feed_by_username (username='mychannelname')
video_params = []
for video in videos.entry: # omitting entry gives error "...object not iterable"
video_params.append(_video_params(request, video.video_id))
return render_to_response(
"django_youtube/videos.html",
{"video_params": video_params},
context_instance=RequestContext(request)
)
what could I be doing wrong?
The text was updated successfully, but these errors were encountered:
Here's my effort:
def video_list(request, username=None):
what could I be doing wrong?
The text was updated successfully, but these errors were encountered: