django部署后样式加载不出来解决方案

django部署后样式加载不出来
1.html文件去掉
2. location /static {
alias /home/static/;
}
3.STATIC_ROOT="/home/static/"
4、根目录:from PROJECT import settings
from django.views.static import serve
url(r'^static/(?P.*)$', serve,
{'document_root': settings.STATIC_ROOT}, name='static')

转载于:https://www.cnblogs.com/leiziv5/p/11082231.html

你可能感兴趣的:(django部署后样式加载不出来解决方案)