Running Django dev server has no problem: ‘python manage.py runserver 9000’ But if use gunicorn, it complains:
'http://innovindex.com/pubmed/static/js/jquery-3.2.1.min.js ’
Why gunicorn cannot find a local jquery but Django can?
The settings are:
settings.py (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:
/home/django/innovindex
is where the ‘manage.py’ sits.
THANK YOU SO MUCH !!!
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!
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 manage.py 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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.