Django FormView响应

2024-10-03 19:32:00 发布

您现在位置:Python中文网/ 问答频道 /正文

嗨!我创建了一个新的Django项目,用FormView上传照片。照片将被处理并提供下载链接。问题是响应:我希望html页面保持不变,只需添加下载链接。在

class ColorImageView(FormView):
  template_name = 'images.html'
  form_class = ColorImageForm

  def form_valid(self, form):
    download_link = ....
    return HttpResponse(...?...)

Screenshot


Tags: 项目djangonameform链接defhtmltemplate