示例#1
0
文件: views.py 项目: snswa/swsites
def topics(request, template_name='dashboard/topics.html'):
    user = request.user
    team_topics = team_topics_for_user(user)
    template_context = {
        'object_list': team_topics,
    }
    return render_to_response(template_name, template_context, RequestContext(request))
示例#2
0
文件: views.py 项目: snswa/swsites
def index(request, template_name='dashboard/index.html'):
    user = request.user
    team_actions = team_actions_for_user(user)
    team_topics = team_topics_for_user(user)
    events = all_events_for_user(user)
    template_context = {
        'team_actions': team_actions,
        'team_topics': team_topics,
        'events': events,
    }
    return render_to_response(
        template_name,
        template_context,
        RequestContext(request),
    )