I am working on Django Rest project and it’s admin side is working fine and properly loading with their static files on local sever. I tried to deploy my project on CPanel where I setup my python setup application successfully but when I load Django admin side with live url link it only shows textfields without classes applied.
Live django endpoint from where django admin tries to load static files is like this:
https://example.com/api/static/admin/css/base.css
Where api is the Application url of my Python app that I setup on CPanel.
I also ran this command:
python manage.py collectstatic
but still server is not able to locate the files.
2
Answers
Follow steps:
run command
python manage.py collectstatic
Reload app
Copy your static folder inside public_html