views.py 文件源码

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

项目:dao_manage 作者: houziyu 项目源码 文件源码
def update_log(request):
    if request.method == 'GET':
        all_log = request.GET.get('all_log')
        hostname = request.GET.get('hostname')
        container_name = request.GET.get('container_name')
        if hostname and container_name:
            docker_download_log_path = docker_initial().docker_update_log(hostname=hostname,container_name=container_name)
            return render(request, 'return_index.html', docker_download_log_path)
        elif all_log:
            docker_log_bak = docker_initial().docker_update_log(all_log=all_log)
            if docker_log_bak:
                return render(request, 'return_index.html',docker_log_bak)
        else:
            errors = {'return_results':'???????????!','log_name':None}
            return render(request, 'return_index.html', errors)
    return HttpResponse('???~')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号