Ejemplo n.º 1
0
def hofchampionspage(request):
    hof_date, hof_count, hof_entries = get_hof_champions()
    template_dict = dict(pageclass="hall-of-fame",
                         pagetitle=_("base halloffame champions"),
                         pagemenu="halloffame",
                         hof_title="halloffame champions title",
                         cpage="champions",
                         hof_text="halloffame champions text",
                         hof_subtitle="halloffame champions subtitle",
                         latest=hof_date,
                         count=hof_count,
                         halloffame=hof_entries)
    _update_hof_with_manual(template_dict)
    return render(request, 'halloffame.html', template_dict)
Ejemplo n.º 2
0
def indexpage(request):
    articles = _("article .index").split()
    articles = articles[0:6]
    cache_id = redis_id.home_stats_data.id
    novalue = "…"
    statswebsite = cache.get(cache_id.format("statswebsite"), novalue)
    statswebsitegood = cache.get(cache_id.format("statswebsitegood"), novalue)
    statswebsitebad = cache.get(cache_id.format("statswebsitebad"), novalue)
    statsmail = cache.get(cache_id.format("statsmail"), novalue)
    statsmailgood = cache.get(cache_id.format("statsmailgood"), novalue)
    statsmailbad = cache.get(cache_id.format("statsmailbad"), novalue)
    statsconnection = cache.get(cache_id.format("statsconnection"), novalue)
    statsconnectiongood = cache.get(
        cache_id.format("statsconnectiongood"), novalue)
    statsconnectionbad = cache.get(
        cache_id.format("statsconnectionbad"), novalue)
    update_base_stats()
    hof_date, hof_count, hof_entries = get_hof_champions(10)
    return render(
        request, 'index.html',
        dict(
            pageclass="home",
            pagemenu="home",
            pagetitle=_("home pagetitle"),
            halloffame=hof_entries,
            count=hof_count,
            statswebsite=statswebsite,
            statswebsitegood=statswebsitegood,
            statswebsitebad=statswebsitebad,
            statsconnection=statsconnection,
            statsconnectiongood=statsconnectiongood,
            statsconnectionbad=statsconnectionbad,
            statsmail=statsmail,
            statsmailgood=statsmailgood,
            statsmailbad=statsmailbad,
            latest=hof_date,
            articles=articles
        ))