在我的development.py设置中,我有以下设置: from django.core.files.storage import FileSystemStorage
...MEDIA_STORAGE = FileSystemStorage(location='/Users/myuser/myfolder') 在我的staging.py设置中,我有这样的设置: from d
我正在尝试通过Django管理网站上传图像。但是它不工作,我已经安装了PIL包。但它正在显示:<django.core.files.storage.FileSystemStorage object at 0x8a92f0c>/mcDonalds.jpg
from django.core.files.storage
此文件的文件路径已在表格中显示为链接,但我无法通过单击它进行下载。我希望能够点击这个链接,并有适当的.docx下载。但我真的不明白这个解决方案是如何工作的。不需要URL吗?我打开了前面的一个问题,被标记为重复的,并指向了这个链接,但我真的不明白这里给出的解决方案。我是否需要以某种方式通过订单的pk或其他什么?任何帮助都将不胜感激。下面是我的代码。order.order_file.url }}">Download</a></td> #this is the link
<