Changes between Version 3 and Version 4 of Ticket #31701


Ignore:
Timestamp:
Jun 13, 2020, 12:20:50 PM (4 years ago)
Author:
Sultan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31701 – Description

    v3 v4  
    33To access the field data in instance dict, **Field.attname** is used as a key.
    44
    5 In addition to the field data, some other model fields (for example, ForeignKey) also use a "client data" of the attribute, the processing of which is performed by a particular descriptor. Such a descriptor is usually assigned to a model using **Field.name**. Its task is to present the same field data in a different format, the result of which differs from the result of Field.attname descriptor: `article.author` returns a User object, and `article.auther_id` returns a User object pk.
     5In addition to the field data, some other model fields (for example, ForeignKey) also use a "client data" of the attribute, the processing of which is performed by a particular descriptor. Such a descriptor is assigned to a model using **Field.name**. Its task is to present the same field data in a different format, the result of which differs from the result of Field.attname descriptor: `article.author` returns a User object, and `article.auther_id` returns a User object pk.
     6
    67This feature is not used in FileField. Then why use FileField.name instead of FileField.attname for FileDescriptor?
    78
Back to Top