python - Download file from a django UpdateView template
问题描述
I'm new to django, and I've a little problem. I've a model with a FileField field, using generic views and ModelForm, I can upload a file to the server. In a modify page using an UpdateView I've a link to my document (e.g. http://127.0.0.1:8000/static-storage/file_name),but if I try to download I get an error page not found. Maybe I need to write an url path but I can't understand how to implement. Could someone give me an help ? Thanks.
解决方案
推荐阅读
- python - 当用 asyncio 调用时,python 说“self”是“缺少所需的位置参数”?
- javascript - Shopify getJSON('/cart.js') 自定义液体值
- amazon-web-services - 在 AWS AppSync 中检测存在
- wordpress - Wordpress Gravity Form 发送给第三方(Sendgrid API)
- java - 接受用户输入后无法打印数组
- c# - 访问控制台应用程序上的 HTTPGET 端点并获得 404
- javascript - 获取在 Postman 上工作的请求,但不在 React.js 中?
- python - 返回包含半径内点的df - python
- php - mysqli_stmt::execute(): (HY000/1364): 字段 'user_pass' 没有默认值
- python - 在 IF 语句中使用时间段