django

非runserver 要配置 STATIC_URL 到 STATIC_ROOT 映射


from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
     url(r'^admin/', admin.site.urls),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) 

https://github.com/anjunact/mysite

posted @ 2017-11-23 17:53  anjunact  阅读(78)  评论(0编辑  收藏  举报