admin管理员组文章数量:1122792
I deployed a Django project on Vercel and it shows the deployment is successful. However, when I try to open the website, it shows the error:
404: NOT_FOUND
Code: NOT_FOUND
ID: lhr1:lhr1::6n29s-1732227821846-0cc9eddbb440
My Django project can be found in the following link:
I tried solving the problem by, as some solutions on stackoverflow suggested, inserting a vercel.json
file and a build.sh
file, adding the line app = application
at the very end of wsgi.py
, including .vercel.app
in my ALLOWED_HOSTS
in setting.py
, and lastly, installed whitenoise. However, none of them seems to work. The application works normally in my local machine, but I'm not sure whether I made a mistake in one of these files. I would be really appreciated if there is a solution to fix this problem.
Edit: I fixed the error by changing the version of python to 3.10, since vercel does not work for Django 5. However, the static files of the website are not working now.
本文标签: python404 NOTFOUND error on VercelDjango deploymentStack Overflow
版权声明:本文标题:python - 404: NOT_FOUND error on Vercel - Django deployment - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736306773a1933079.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论