djangodeploymentproductionpythonanywheredjango-staticfiles

serving static files in django on pythonanywhere


hello guys i need your help, i followed all the steps to serve my static files for my django application, i ran the collectstatic command, and i can see my files in the static folder in the root directory but i cant access them

idk why for example i type https://scheduling.pythonanywhere.com/static/assets/css/style.css i get Not Found The requested resource was not found on this server., eventhough ik that my files are there

(venv) 12:25 ~/Scheduling (main)$ ls
Mappord  appOrd  manage.py  mydb.sqlite3  requirements.txt  static  vercel.json

Solution

  • It directly means if you can't access those files how can pythonanywhere so you would need to grant your user or change permission of directory by using:

    chmod -R 770 /path/to/your/static/folder
    

    I hope this helps you...