django部署后样式加载不出来
1.html文件去掉<!DOCTYPE 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<path>.*)$', serve,
{'document_root': settings.STATIC_ROOT}, name='static')

相关文章:

  • 2022-12-23
  • 2021-06-10
  • 2021-09-13
  • 2021-04-27
  • 2021-11-28
  • 2021-06-02
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-11-26
相关资源
相似解决方案