📜  settings.debug django - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:42.292000             🧑  作者: Mango

代码示例1
# Required Imports
from django.conf.urls.static import static
from django.conf import settings

# Below Urlpatterns
if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)