old_views.py 文件源码

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

项目:cocreate 作者: ngageoint 项目源码 文件源码
def scheduleSandboxDeployment(request, sbr):
    """
    Given a newly created sandbox request, schedule the deployment with the backend. This
    will also handle any quota checking, notifications, and environment specific prep.
    """
    if sbr.sandbox.playground.environment == 'locl':
        # local deploy, no formal request
        sbr.request_status = 'avl'
        sbr.save()
    else:
        # environment deploy, let's kick it to the admins
        sandbox_request_uri = request.build_absolute_uri(reverse('admin:cocreate_sandboxrequest_change', args=(sbr.id,)))
        mail_admins(
            "Sandbox Request for Review",
            "There's a new request for review at " + sandbox_request_uri,
            html_message = get_template("sandboxRequestToAdmins.html").render(Context({"sandbox_request_uri": sandbox_request_uri}))
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号