def video(request, video_id):
<EOL>api = Api()<EOL>api.authenticate()<EOL>availability = api.check_upload_status(video_id)<EOL>if availability is not True:<EOL><INDENT>video = Video.objects.filter(video_id=video_id).get()<EOL>state = availability["<STR_LIT>"]<EOL>if state == "<STR_LIT>" or state == "<STR_LIT>":<EOL><INDENT>return render_to_response(<EOL>"<STR_LIT>",<EOL>{"<STR_LIT>": video, "<STR_LIT>": video_id, "<STR_LIT:message>":<EOL>_("<STR_LIT>"), "<STR_LIT>": availability},<EOL>context_instance=RequestContext(request)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>return render_to_response(<EOL>"<STR_LIT>",<EOL>{"<STR_LIT>": video, "<STR_LIT>": video_id,<EOL>"<STR_LIT:message>": _("<STR_LIT>"), "<STR_LIT>": availability},<EOL>context_instance=RequestContext(request)<EOL>)<EOL><DEDENT><DEDENT>video_params = _video_params(request, video_id)<EOL>return render_to_response(<EOL>"<STR_LIT>",<EOL>video_params,<EOL>context_instance=RequestContext(request)<EOL>)<EOL>
Displays a video in an embed player