Django static files are not loaded on cPanel

Viewed 88

I deployed a django app on cPanel. I installed python, django and set the STATIC Variables in settings.py and ran collectstatic. and everything works fine. I get the message in terminal that the static files are copied. but when I launch the application static files are not loaded and gives 404 error. but those static file exists in my public_html folder. I'm really stuck what could be the problem.

When i checked the log file I get the following error :

/opt/cpanel/ea-ruby24/root/usr/share/passenger/helper-scripts/wsgi-loader.py:26: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
App 2893412 output:   import sys, os, re, imp, threading, signal, traceback, socket, select, struct, logging, errno

I can see that the error is in wsgi-loader.py file. but I can't find it anywhere on the server. Please help it's taken days for me already.

0 Answers
Related