コード例 #1
0
ファイル: views.py プロジェクト: wd5/1-annkpx
def home_page(request):
    c = get_common_context(request)
    c['request_url'] = 'home'
    c['articles'] = Article.get_recent(10)
    c['home_who'] = Page.get_page_by_slug('home_who')['content']
    c['home_where'] = Page.get_page_by_slug('home_where')['content']
    c['home_from'] = Page.get_page_by_slug('home_from')['content']
    c['home_reason'] = Page.get_page_by_slug('home_reason')['content']
    return render_to_response('home.html', c, context_instance=RequestContext(request))
コード例 #2
0
ファイル: views.py プロジェクト: kpx13/sofi
def home_page(request):
    c = get_common_context(request)
    c['request_url'] = 'home'
    c['left_col'], c['right_col'] = Article.get_recent()
    return render_to_response('home.html', c, context_instance=RequestContext(request))