| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2026-04-14 | Fixed #27150 -- Made base File objects truthy by default. | VIZZARD-X | |
| 2025-10-15 | Fixed 36622 -- Prevented LazyObject FileField storages from evaluating at ↵ | Clifford Gama | |
| boot time. Co-authored-by: Fabien MICHEL <fmichel@adista.fr> | |||
| 2025-07-23 | Refs #36500 -- Rewrapped long docstrings and block comments via a script. | django-bot | |
| Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505. | |||
| 2025-07-23 | Removed double spaces after periods and within phrases. | Sarah Boyce | |
| 2025-01-20 | Fixed #36005 -- Dropped support for Python 3.10 and 3.11. | Mariusz Felisiak | |
| 2024-08-05 | Fixed #35657 -- Made FileField handle db_default values. | Sarah Boyce | |
| 2024-05-22 | Fixed #35139 -- Prevented file read after ImageField is saved to storage. | John Parton | |
| 2024-05-15 | Fixed #35384 -- Raised FieldError when saving a file without a name to ↵ | Jonny Park | |
| FileField. | |||
| 2023-06-19 | Refs #34517 -- Restored skipping ImageFileField.update_dimension_fields ↵ | François Freitag | |
| without width/height fields. This avoids reading the image size when the dimensions fields (image_width, image_height) do not exist, as that operation may be expensive. Partially reverts ea53e7c09f1b8864c20c65976bbeaeab77abdaec, that dropped the check for the dimension fields in update_dimension_fields(), because the post_init signal was no longer registered without dimension fields. However, another code path to that function exists: when the ImageFileField is save()d, the name from the storage is setattr()ed on the field, and ImageFileDescriptor calls update_dimension_fields() because the image size might have changed. Keep bailing out early when dimensions are unused. Besides, computing the image dimensions causes to close() the file, resulting in a backward-incompatible change. The test protects against that change. | |||
| 2023-05-03 | Fixed #34517 -- Avoided connection post_init signal to ImageField without ↵ | Orhan Hirsch | |
| width/height fields. | |||
| 2023-02-01 | Refs #33476 -- Applied Black's 2023 stable style. | David Smith | |
| Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0 | |||
| 2023-01-23 | Fixed #34192 -- Preserved callable storage when it returns default_storage. | Matt Westcott | |
| 2022-11-04 | Fixed #27654 -- Propagated alters_data attribute to callables overridden in ↵ | LightDiscord | |
| subclasses. Thanks Shai Berger and Adam Johnson for reviews and the implementation idea. | |||
| 2022-08-25 | Fixed typo in django/db/models/fields/files.py comment. | Jan Pieter Waagmeester | |
| 2022-02-07 | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | |
| 2022-02-07 | Refs #33476 -- Reformatted code with Black. | django-bot | |
| 2021-05-13 | 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. | |||
| 2021-05-04 | Fixed CVE-2021-31542 -- Tightened path & file name sanitation in file uploads. | Florian Apolloner | |
| 2020-10-12 | Fixed #32098 -- Made FieldFile use FileField.attname. | Sultan | |
| After a93425a37f4defdb31d4ca96bb3bf6da21f0b5ce FileDescriptor is a subclass of DeferredAttribute and uses FileField.attname to access the field data, so that custom subclasses can not only save data to files, but also represent the same data with a different data type by attaching FileFiled.name to a particular descriptor. Follow up to a93425a37f4defdb31d4ca96bb3bf6da21f0b5ce. | |||
| 2020-09-02 | Fixed #31941 -- Corrected FileField.deconstruct() with a callable storage. | Brian Helba | |
| 2020-07-24 | Fixed #31812 -- Fixed FileField.model for fields defined in abstract models. | Matthias Kestenholz | |
| Regression in a93425a37f4defdb31d4ca96bb3bf6da21f0b5ce. | |||
| 2020-06-30 | Fixed #31701 -- Made FileDescriptor subclass DeferredAttribute. | alosultan | |
| 2020-06-15 | Fixed #31706 -- Removed unnecessary getattr() call in FileDescriptor.__get__(). | Sultan | |
| refresh_from_db() loads fields values. | |||
| 2020-04-08 | Fixed #28184 -- Allowed using a callable for FileField and ImageField storage. | miigotu | |
| 2020-01-09 | Fixed #21238 -- Fixed restoring attributes when pickling FileField and ↵ | Hasan Ramezani | |
| ImageField. | |||
| 2019-08-18 | Refs #28428 -- Made FileField.upload_to support pathlib.Path. | Claude Paroz | |
| 2019-04-18 | Fixed #30367 -- Changed "pip install" to "python -m pip install" in docs, ↵ | Ramiro Morales | |
| comments and hints. | |||
| 2019-01-27 | Removed default mode='r' argument from calls to open(). | Jon Dufresne | |
| 2018-04-17 | Fixed #29334 -- Updated pypi.python.org URLs to pypi.org. | Brett Cannon | |
| 2018-01-03 | Fixed #28982 -- Simplified code with and/or. | Дилян Палаузов | |
| 2018-01-03 | Fixed #28984 -- Made assorted code simplifications. | Tim Graham | |
| 2018-01-03 | Fixed #28985 -- Removed unneeded None checks before hasattr(). | Дилян Палаузов | |
| 2017-12-11 | Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking. | Nick Pope | |
| 2017-12-04 | Fixed #28873 -- Used dict.setdefault() to set model and form field defaults. | Дилян Палаузов | |
| 2017-06-01 | Fixed #28242 -- Moved ImageField file extension validation to the form field. | Manatsawin Hanmongkolchai | |
| 2017-04-07 | Fixed #27777 -- Made File.open() work with the with statement (#8310) | Ingo Klöcker | |
| Fixed #27777 -- Made File.open() work with the with statement | |||
| 2017-03-04 | Refs #27795 -- Removed unneeded force_text calls | Claude Paroz | |
| Thanks Tim Graham for the review. | |||
| 2017-02-28 | Refs #27656 -- Updated django.db docstring verbs according to PEP 257. | Anton Samarchyan | |
| 2017-02-28 | Removed obsolete references to form_for_instance(). | Tim Graham | |
| 2017-02-07 | Converted usage of ugettext* functions to their gettext* aliases | Claude Paroz | |
| Thanks Tim Graham for the review. | |||
| 2017-01-26 | Refs #23919, #27778 -- Removed obsolete mentions of unicode. | Vytis Banaitis | |
| 2017-01-25 | Refs #23919 -- Replaced super(ClassName, self) with super(). | chillaranand | |
| 2017-01-20 | Refs #23919 -- Removed unneeded str() calls | Claude Paroz | |
| 2017-01-20 | Refs #23919 -- Removed unneeded force_str calls | Claude Paroz | |
| 2017-01-19 | Refs #23919 -- Stopped inheriting from object to define new style classes. | Simon Charette | |
| 2017-01-18 | Refs #23919 -- Removed obsolete __ne__() methods. | Aymeric Augustin | |
| __ne__() defaults to the opposite of __eq__() on Python 3 when it doesn't return NotImplemented. | |||
| 2017-01-18 | Refs #23919 -- Removed six.<various>_types usage | Claude Paroz | |
| Thanks Tim Graham and Simon Charette for the reviews. | |||
| 2017-01-17 | Refs #26058 -- Removed deprecated FileField.get_directory_name()/get_filename(). | Tim Graham | |
| 2016-11-30 | Refs #27358 -- Fixed system check crash with an empty FileField.upload_to. | Lex Berezhny | |
| 2016-11-29 | Fixed #27358 -- Added a system check to prevent FileField's upload_to from ↵ | Henry Dang | |
| starting with a slash. Thanks Frank Bijlsma for the initial patch. | |||
