DEV Community

Shailesh Waghole
Shailesh Waghole

Posted on

Unable to Access Static Files in Django. Need some help

I am facing issue while fetching static files in Django. Even I pass correct path where files are stored

Top comments (3)

Collapse
 
c_v_ya profile image
Constantine

Well, that means something is wrong. Read carefully through the docs. Do you have your app in INSTALLED_APPS? Do you have APP_DIRS=True in TEMPLATES: [{...}] section of the settings? Usually, you don't need to provide a path there. But you need your templates be in correct dirs. E.g. project_name/app_name/templates, maybe additionally /app_name after that. Maybe you're starting your app in production mode in docker but not doing collectstatic? So, yeah, recheck everything and it should work. I've been there too: looks like everything is correct but the damn thing is just not working! And in the end it almost always turns out the problem is me/you/developer not paying enough attention. Also, you can join a python slack group here at pyslcakers.com where a lot (~30k) of people can help you with your questions (if you're nice 😉).

Collapse
 
shailesh6363 profile image
Shailesh Waghole

Hello Constantine,
Thanks For Reply. I will try steps which you mentioned. If still error is occur then I will share my screen and source code to you for review.

Collapse
 
shailesh6363 profile image
Shailesh Waghole

I will check and let you know 👍