示例#1
0
def preview_news(request, news_id=None):
    news = get_object_or_404(News, entity_ptr_id=news_id)
    news_copy = copy.deepcopy(news)
    converted_video_url = None
    if news.video_url is not None:
        converted_video_url = convert_youku_video_url(news.video_url)
    news_copy.video_url = converted_video_url
    return render(request, 'preview_news.html', {'news': news_copy})
示例#2
0
def preview_news(request, news_id=None):
    news = get_object_or_404(News, entity_ptr_id=news_id)
    news_copy = copy.deepcopy(news)
    converted_video_url = None
    if news.video_url is not None:
        converted_video_url = convert_youku_video_url(news.video_url)
    news_copy.video_url = converted_video_url
    return render(request, 'preview_news.html', { 'news' : news_copy })
示例#3
0
def preview_game(request, game_id=None):
    game = get_object_or_404(Game, entity_ptr_id=game_id)
    game_copy = copy.deepcopy(game)
    converted_video_url = None
    if game.video_url is not None:
        converted_video_url = convert_youku_video_url(game.video_url)
    game_copy.video_url = converted_video_url
    return render(request, 'preview_game.html', {'game': game_copy})
示例#4
0
def preview_game(request, game_id=None):
    game = get_object_or_404(Game, entity_ptr_id=game_id)
    game_copy = copy.deepcopy(game)
    converted_video_url = None
    if game.video_url is not None:
        converted_video_url = convert_youku_video_url(game.video_url)
    game_copy.video_url = converted_video_url
    return render(request, 'preview_game.html', {'game' : game_copy})