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

蓝蓝 · May 28, 2024 · 2296 hits

官网解决方案:
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 了

No Reply at the moment.
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up