Why gunicorn cannot find static files?

Running Django dev server has no problem: ‘python runserver 9000’ But if use gunicorn, it complains:


Why gunicorn cannot find a local jquery but Django can?

The settings are: (seems not related): STATIC_URL = ‘/pubmed/static/’

in ‘/etc/nginx/sites-enabled/django’

location /static {
   alias /home/django/innovindex/pubmed/static/;

And my app looks like this:


is where the ‘’ sits.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Because runserver also serves static files at development environment for you. Deployed apps require the webserver to do this. Thats why you have to run collectstatic on your server so all static files from all apps (appone/static, apptwo/static etc…) are copied to static folder configured in your django settings file.