1.修改setting.py,添加static_root

dajngo debug=false时无法加载css、js

2.修改urls.py,添加 一条路由

url(r’^static/(?P.*)$’, ‘django.views.static.serve’, {‘document_root’: settings.STATIC_ROOT}),

详细参考此博客
dajngo debug=false时无法加载css、js

相关文章:

  • 2021-07-05
  • 2022-01-23
  • 2023-03-25
  • 2021-07-26
  • 2021-12-03
  • 2021-06-03
  • 2022-12-23
  • 2021-08-04
猜你喜欢
  • 2022-01-13
  • 2021-09-03
  • 2021-07-10
  • 2022-12-23
  • 2021-10-22
  • 2022-01-02
相关资源
相似解决方案