summaryrefslogtreecommitdiff
path: root/tests/model_fields/test_filefield.py
AgeCommit message (Collapse)Author
2021-05-14[2.2.x] Refs #32718 -- Fixed file_storage.test_generate_filename and ↵Mariusz Felisiak
model_fields.test_filefield tests on Python 3.5.
2021-05-13[2.2.x] Fixed #32718 -- Relaxed file name validation in FileField.Mariusz Felisiak
- Validate filename returned by FileField.upload_to() not a filename passed to the FileField.generate_filename() (upload_to() may completely ignored passed filename). - Allow relative paths (without dot segments) in the generated filename. Thanks to Jakub Kleň for the report and review. Thanks to all folks for checking this patch on existing projects. Thanks Florian Apolloner and Markus Holtermann for the discussion and implementation idea. Regression in 0b79eb36915d178aef5c6a7bbce71b1e76d376d3. Backport of b55699968fc9ee985384c64e37f6cc74a0a23683 from main.
2017-05-31Refs #27777 -- Improved docs/added test for File context manager change.Ingo Klöcker
2016-10-28Fixed #27188 -- Allowed using unique=True with FileField.Michael Scott
Thanks Tim Graham for the initial patch.
2016-10-26Fixed #27334 -- Allowed FileField to move rather than copy a file.Adam Chidlow
When a FileField is set to an instance of File that is not also an instance of FieldFile, pre_save() passes that object as the contents to Storage.save(). This allows the file to be moved rather than copied to the upload destination.
2016-07-16Fixed #26900 -- Fixed crash accessing deferred FileFields.Tim Graham
2016-03-23Split model_fields tests into different files.Tim Graham