Changes between Initial Version and Version 2 of Ticket #32098


Ignore:
Timestamp:
Oct 10, 2020, 4:22:44 AM (4 years ago)
Author:
Sultan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32098

    • Property Owner changed from nobody to Sultan
    • Property Status newassigned
  • Ticket #32098 – Description

    initial v2  
    1 In ticket #31701, I suggested making **FileDescriptor** a subclass of **DeferredAttribute** and using `FileField.attname` to access the field data, leaving `FileField.name` for users to freely and easily create their own subclasses (e.g. **ContentFileField**, **JSONContentFileField**, etc.) ), to represent data in a different format; `JSONContentFileField.attname` represents **File object** (field data) and `JSONContentFileField.name` represents deserialized JSON document to Python object (client data).
     1In ticket #31701, I suggested making FileDescriptor a subclass of DeferredAttribute and using `FileField.attname` to access the field data, leaving `FileField.name` so that users can freely and easily create their own custom subclasses that 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 (just as it is implemented in the `models.ForeignKey`).
    22
    3 In the patch attached to ticket #31701, I fixed **FileField**, **ImageField** and their descriptors, but missed the **FieldFile**, which uses `FileField.name` when saving / deleting a file. I checked everything and made the necessary changes (2 lines).
     3In the patch attached to ticket #31701, I fixed FileField, ImageField and their descriptors, but missed the FieldFile, which still uses FileField.name when saving/deleting a file. I checked everything and made the necessary changes (2 lines).
Back to Top