I'm trying to put a django website live and after going through the deployment checklist and turning debug = False
django gives out a 404 error and only static files are loaded no media files uploaded from users are displayed. However with debug=True
all the images and files work properly. below are the configurations of the project with debug = True
. The console logs show multiple missing files.can someone point to me what i'm doing wrong?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Django __str__ returned non-string (type NoneType)
- Evil ctypes hack in python
Basically you are putting the application in
DEBUG=False
"mode", this means that django won't serve any static files. But on the other hand, if you want to test locally howDEBUG=False
affects your environment, locally you can usepython manage.py runserver --insecure
option which will allow django to serve static files. But I must note that this is vastly inefficient and maybe insecure too.Hope this helps.