Admin Css not served

December 3, 2017 115 views
Django Ubuntu

Path issue.
How to resolve
Nginx log
2017/12/03 17:06:10 [error] 3001#3001: *53342 open() "/usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin//css/base.css" failed (2: No such file or directory), server: _, request: "GET /static/admin/css/base.css HTTP/1.1",
How to remove this extra slash

EDIT:
/usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin//css/base.css
theres no django in dist-packages
why and how?
pls help

1 Answer

You have to setup your nginx to SERVE static files and use the command manage.py collectstatic to copy all your apps' /static folders to one combined folder nginx (or other server) will serve.

Have another answer? Share your knowledge.