Changes between Initial Version and Version 2 of Ticket #26508
- Timestamp:
- Apr 15, 2016, 1:36:42 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26508
- Property Summary FieldFile.open documentation incorrect → clean up FieldFile.open documentation
-
Ticket #26508 – Description
initial v2 1 1 The documentation for `FieldFile.open` claims that it behaves like the standard Python `open()` method, which is incorrect. It does not return a file descriptor the way the Python method does. 2 2 3 This method also may not be necessary to call except to re-open the file, since the underlying file is opened implicitly any time the `file` attribute is accessed.3 It is also unnecessary to call the `open` method except to re-open the file or change the mode, since the underlying file is opened implicitly any time the `file` attribute is accessed. 4 4 5 I have a proposed change to the documentation which I will link to after I have a ticket number assigned.5 Finally, I found it surprising that two methods in this class default to also saving the model object (associated with the `FileField` associated with the `FieldFile` that is being saved or deleted). I added a louder warning about this -- I would rather be reminded twice than spend time trying to figure out how and why my model instance is being saved before I wanted it to be.