简体   繁体   中英

Static files not loading (Django 1.11)

I am trying to set up a development version of a Django Rest (1.11) application on a mac.

I have run the python manage.py collectstatic command and this resulted in the files being copied into a 'static' folder.

However when I run the application ( python manage.py runserver ) none of the static files load in the browser (no css). The Network tab shows the status of the static files as 404.

My settings.py file has the following:

STATIC_URL = '/static/' STATIC_ROOT = BASE_DIR + '/abba_rest/static/'

Appreciate any advice on how to debug this issue.

我在启动服务器时使用 --insecure 标志加载了静态文件;

python manage.py runserver --insecure

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM