1.當settings.py文件設置DEBUG = True無法加載靜態文件問題。
解決方法:
1.用nginx或者apache代理靜態資源/staic/
2.使用django.views.static.serve()方法。在URLconf中添加:
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': '/path/to/media'}),
3.(!推薦)改變項目運行方式,在啓動時加入 --insecure參數。
python manage.py runserver --insecure