擅长:python、mysql、java
<p>因为settings.MEDIA\u根目录是目录。您需要为句柄提供文件名。
最好将Model与FileField一起使用,因为它会自动在媒体中生成唯一的文件名。它在<a href="https://docs.djangoproject.com/en/1.5/topics/http/file-uploads/" rel="nofollow">https://docs.djangoproject.com/en/1.5/topics/http/file-uploads/</a>中描述</p>