def home(request):

    community_news = get_object_fallback(
        Document, COMMUNITY_NEWS_DOC, request.LANGUAGE_CODE)
    locale = _validate_locale(request.GET.get('locale'))
    product = request.GET.get('product')
    if product:
        product = get_object_or_404(Product, slug=product)

    # Get the 5 most recent Community Discussion threads.
    recent_threads = Thread.objects.filter(forum__slug='contributors')[:5]

    data = {
        'community_news': community_news,
        'locale': locale,
        'product': product,
        'products': Product.objects.filter(visible=True),
        'threads': recent_threads,
    }

    if locale:
        data['top_contributors_aoa'], _ = top_contributors_aoa(locale=locale)

        # If the locale is en-US we should top KB contributors, else we show
        # top l10n contributors for that locale
        if locale == settings.WIKI_DEFAULT_LANGUAGE:
            data['top_contributors_kb'], _ = top_contributors_kb(
                product=product)
        else:
            data['top_contributors_l10n'], _ = top_contributors_l10n(
                locale=locale, product=product)

        # If the locale is enabled for the Support Forum, show the top
        # contributors for that locale
        if locale in QuestionLocale.objects.locales_list():
            data['top_contributors_questions'], _ = top_contributors_questions(
                locale=locale, product=product)
    else:
        # If no locale is specified, we show overall top contributors
        # across locales.
        data['top_contributors_aoa'], _ = top_contributors_aoa()
        data['top_contributors_kb'], _ = top_contributors_kb(product=product)
        data['top_contributors_l10n'], _ = top_contributors_l10n(
            product=product)
        data['top_contributors_questions'], _ = top_contributors_questions(
            product=product)

    return render(request, 'community/index.html', data)
Community hub landing page.
dataset/ETHPy150Open mozilla/kitsune/kitsune/community/views.py/home