Changes between Initial Version and Version 2 of Ticket #26508


Ignore:
Timestamp:
Apr 15, 2016, 1:36:42 PM (9 years ago)
Author:
Tobias McNulty
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26508

    • Property Summary FieldFile.open documentation incorrectclean up FieldFile.open documentation
  • Ticket #26508 – Description

    initial v2  
    11The 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.
    22
    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.
     3It 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.
    44
    5 I have a proposed change to the documentation which I will link to after I have a ticket number assigned.
     5Finally, 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.
Back to Top