Example #1
0
def home(request):
    """Index page view"""

    latest_threads = queries.get_latest_threads()
    hottest_threads = queries.get_hottest_threads()

    template_data = {
        'hottest_threads': hottest_threads[:6],
        'latest_threads': latest_threads[:6],
        'type_count': solrutils.count_types(sample=1000),
        'latest_docs': solrutils.get_latest_collaborations(6),
    }
    return render_to_response('home.html', template_data,
                              context_instance=RequestContext(request))
Example #2
0
 def items(self):
     return queries.get_hottest_threads()[:20]