コード例 #1
0
ファイル: views.py プロジェクト: writefaruq/zamboni
def pane(request, version, platform, compat_mode='strict'):

    def from_api(list_type):
        return api_view(request, platform, version, list_type)

    promovideo = PromoVideoCollection().get_items()

    return jingo.render(request, 'discovery/pane.html',
                        {'modules': get_modules(request, platform, version),
                         'up_and_coming': from_api('hotness'),
                         'featured_addons': from_api('featured'),
                         'featured_personas': get_featured_personas(request),
                         'version': version, 'platform': platform,
                         'promovideo': promovideo})
コード例 #2
0
def pane(request, version, platform, compat_mode=None):

    if not compat_mode:
        compat_mode = get_compat_mode(version)

    def from_api(list_type):
        return api_view(request, platform, version, list_type,
                        compat_mode=compat_mode)

    promovideo = PromoVideoCollection().get_items()

    return jingo.render(request, 'discovery/pane.html',
                        {'up_and_coming': from_api('hotness'),
                         'featured_addons': from_api('featured'),
                         'featured_personas': get_featured_personas(request),
                         'version': version, 'platform': platform,
                         'promovideo': promovideo, 'compat_mode': compat_mode})