請問 django admin 介面 css 丟失解決辦法?

蓝蓝發表於2024-05-28

官網解決方案:
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 了

相關文章