如果不使用指定detail = None的else条件语句,views.py中的以下代码将抛出错误 s = Simple.objects.all() detail = get_object_orrender(request,'simple_app/list.html',{'s':s,'d':detail})
de
我正在尝试在digitalocean上部署django react应用程序与nginx gunicorn。我已经创建了virtualenv,当我尝试运行时: gunicorn --bind 0.0.0.0:8000 myproject.wsgi 它不加载react前端,而是django后端加载。我知道gunicorn不是静态的,但它加载白色页面时出现错误: You need to enable JavaScript to run this app. ?