summaryrefslogtreecommitdiff
path: root/django/db/models/fields/files.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #34517 -- Avoided connection post_init signal to ImageField without ↵Orhan Hirsch2023-05-031-5/+4
| | | | width/height fields.
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-011-1/+0
| | | | | | | | 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
* Fixed #34192 -- Preserved callable storage when it returns default_storage.Matt Westcott2023-01-231-2/+3
|
* Fixed #27654 -- Propagated alters_data attribute to callables overridden in ↵LightDiscord2022-11-041-1/+2
| | | | | | | subclasses. Thanks Shai Berger and Adam Johnson for reviews and the implementation idea.
* Fixed typo in django/db/models/fields/files.py comment.Jan Pieter Waagmeester2022-08-251-1/+1
|
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-071-1/+2
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-48/+75
|
* Fixed #32718 -- Relaxed file name validation in FileField.Mariusz Felisiak2021-05-131-1/+1
| | | | | | | | | | | | | - 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.
* Fixed CVE-2021-31542 -- Tightened path & file name sanitation in file uploads.Florian Apolloner2021-05-041-0/+2
|
* Fixed #32098 -- Made FieldFile use FileField.attname.Sultan2020-10-121-2/+2
| | | | | | | | | 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.
* Fixed #31941 -- Corrected FileField.deconstruct() with a callable storage.Brian Helba2020-09-021-1/+3
|
* Fixed #31812 -- Fixed FileField.model for fields defined in abstract models.Matthias Kestenholz2020-07-241-0/+4
| | | | Regression in a93425a37f4defdb31d4ca96bb3bf6da21f0b5ce.
* Fixed #31701 -- Made FileDescriptor subclass DeferredAttribute.alosultan2020-06-301-16/+8
|
* Fixed #31706 -- Removed unnecessary getattr() call in FileDescriptor.__get__().Sultan2020-06-151-4/+2
| | | refresh_from_db() loads fields values.
* Fixed #28184 -- Allowed using a callable for FileField and ImageField storage.miigotu2020-04-081-1/+8
|
* Fixed #21238 -- Fixed restoring attributes when pickling FileField and ↵Hasan Ramezani2020-01-091-5/+15
| | | | ImageField.
* Refs #28428 -- Made FileField.upload_to support pathlib.Path.Claude Paroz2019-08-181-1/+1
|
* Fixed #30367 -- Changed "pip install" to "python -m pip install" in docs, ↵Ramiro Morales2019-04-181-1/+1
| | | | comments and hints.
* Removed default mode='r' argument from calls to open().Jon Dufresne2019-01-271-1/+1
|
* Fixed #29334 -- Updated pypi.python.org URLs to pypi.org.Brett Cannon2018-04-171-1/+1
|
* Fixed #28982 -- Simplified code with and/or.Дилян Палаузов2018-01-031-3/+1
|
* Fixed #28984 -- Made assorted code simplifications.Tim Graham2018-01-031-1/+1
|
* Fixed #28985 -- Removed unneeded None checks before hasattr().Дилян Палаузов2018-01-031-3/+3
|
* Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.Nick Pope2017-12-111-13/+18
|
* Fixed #28873 -- Used dict.setdefault() to set model and form field defaults.Дилян Палаузов2017-12-041-1/+1
|
* Fixed #28242 -- Moved ImageField file extension validation to the form field.Manatsawin Hanmongkolchai2017-06-011-2/+0
|
* Fixed #27777 -- Made File.open() work with the with statement (#8310)Ingo Klöcker2017-04-071-0/+1
| | | Fixed #27777 -- Made File.open() work with the with statement
* Refs #27795 -- Removed unneeded force_text callsClaude Paroz2017-03-041-2/+1
| | | | Thanks Tim Graham for the review.
* Refs #27656 -- Updated django.db docstring verbs according to PEP 257.Anton Samarchyan2017-02-281-6/+4
|
* Removed obsolete references to form_for_instance().Tim Graham2017-02-281-7/+0
|
* Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz2017-02-071-1/+1
| | | | Thanks Tim Graham for the review.
* Refs #23919, #27778 -- Removed obsolete mentions of unicode.Vytis Banaitis2017-01-261-1/+1
|
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-15/+15
|
* Refs #23919 -- Removed unneeded str() callsClaude Paroz2017-01-201-1/+1
|
* Refs #23919 -- Removed unneeded force_str callsClaude Paroz2017-01-201-2/+2
|
* Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette2017-01-191-1/+1
|
* Refs #23919 -- Removed obsolete __ne__() methods.Aymeric Augustin2017-01-181-3/+0
| | | | | __ne__() defaults to the opposite of __eq__() on Python 3 when it doesn't return NotImplemented.
* Refs #23919 -- Removed six.<various>_types usageClaude Paroz2017-01-181-4/+3
| | | | Thanks Tim Graham and Simon Charette for the reviews.
* Refs #26058 -- Removed deprecated FileField.get_directory_name()/get_filename().Tim Graham2017-01-171-19/+0
|
* Refs #27358 -- Fixed system check crash with an empty FileField.upload_to.Lex Berezhny2016-11-301-1/+1
|
* Fixed #27358 -- Added a system check to prevent FileField's upload_to from ↵Henry Dang2016-11-291-0/+15
| | | | | | starting with a slash. Thanks Frank Bijlsma for the initial patch.
* Fixed #27188 -- Allowed using unique=True with FileField.Michael Scott2016-10-281-14/+0
| | | | Thanks Tim Graham for the initial patch.
* Fixed #27334 -- Allowed FileField to move rather than copy a file.Adam Chidlow2016-10-261-1/+1
| | | | | | | 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.
* Replaced property() usage with decorator in several places.Berker Peksag2016-08-251-8/+8
|
* Fixed #13809 -- Made FieldFile.open() respect its mode argument.Chris Sinchok2016-08-091-1/+4
|
* Fixed #26900 -- Fixed crash accessing deferred FileFields.Tim Graham2016-07-161-3/+8
|
* Fixed #21548 -- Added FileExtensionValidator and validate_image_file_extension.Berker Peksag2016-06-301-0/+2
|
* Reverted "Fixed #26398 -- Made FieldFile.open() respect its mode argument."Tim Graham2016-06-171-3/+4
| | | | | This reverts commit a52a531a8b34f049fba11c3ee7b010af7534bf90 due to regressions described in refs #26772.
* Fixed #22936 -- Obsoleted Field.get_prep_lookup()/get_db_prep_lookup()Claude Paroz2016-05-041-5/+0
| | | | Thanks Tim Graham for completing the initial patch.
* Fixed #26058 -- Delegated os.path bits of FileField's filename generation to ↵Cristiano2016-04-301-7/+24
| | | | the Storage.