In Django, how can I save the value of the File input after returning it through an error?

  • Say someone is submitting a form. (I fully use the Django framework)
  • The form goes through my models.py and does not validate.
  • I redirect them back to the page and display form errors.
  • All text fields have their initial value in them, so the user does not need to re-specify them. But my "File Select" has lost its value !!! He no longer has a file.
  • Now the user needs to select the file again. This sucks!
+3
source share
1 answer

, , ( ), , , , <input type="file">.

+2

Source: https://habr.com/ru/post/1778863/


All Articles