Python 请问 django admin 界面 css 丢失解决办法?

蓝蓝 · 2024年05月28日 · 1329 次阅读

官网解决方案:
https://docs.djangoproject.com/en/1.10/howto/static-files/

我加了:

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    # ... the rest of your URLconf goes here ...
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

怎么没效果呢??
最后开启 debug=True admin css 才行,关闭 debug css 就 404 了

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册