account.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:FRG-Crowdsourcing 作者: 97amarnathk 项目源码 文件源码
def projects(name):
    """
    List user's project list.

    Returns a Jinja2 template with the list of projects of the user.

    """
    user = user_repo.get_by_name(name)
    if not user:
        return abort(404)
    if current_user.name != name:
        return abort(403)

    user = user_repo.get(current_user.id)
    projects_published, projects_draft = _get_user_projects(user.id)

    response = dict(template='account/projects.html',
                    title=gettext("Projects"),
                    projects_published=projects_published,
                    projects_draft=projects_draft)
    return handle_content_type(response)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号