default.py 文件源码

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

项目:pyramid-zappa-api-boilerplate 作者: web-masons 项目源码 文件源码
def create_user(request):
    newFirstName = request.matchdict.get('first_name')
    newLastName = request.matchdict.get('last_name')
    createdAt = datetime.now()
    user = User(first_name=newFirstName, last_name=newLastName, created_at=createdAt)
    with transaction.manager:
        DBSession.add(user)
        # Flush to get the post.id from the database
        DBSession.flush()
        return HTTPOk()


# Update User
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号