示例#1
0
文件: other.py 项目: Conectivo/colab
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))
示例#2
0
文件: feeds.py 项目: Conectivo/colab
 def items(self):
     return queries.get_hottest_threads()[:20]