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