擅长:python、mysql、java
<p>根据Django文档,对于Django 1.11及更高版本,您需要重写:</p>
<p><strong>网址.py</strong></p>
<pre><code>from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
</code></pre>