#34569: Unify all model fields to call get_prep_value from get_db_prep_value
-------------------------------------+-------------------------------------
               Reporter:  Julie      |          Owner:  nobody
  Rymer                              |
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:  Database   |        Version:  4.2
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Following on #34539, should all fields that do not currently call
 `get_prep_value` from `get_db_prep_value` be updated to call it so that we
 have no more inconsistency with the
 [https://docs.djangoproject.com/en/4.2/howto/custom-model-fields
 /#converting-python-objects-to-query-values fields customization doc]?

 Here is the list of all concerned fieldst:
 - AreaField (contrib.gis)
 - DistanceField (contrib.gis)
 - ArrayField (contrib.postgres)
 - DurationField
 - UUIDField (this one even has a definition for `get_prep_value`, but it
 is never called)
 - ForeignKey (like previous one, possess definition for `get_prep_value`,
 never called)

 Please give me your thoughts or if I missed anything.
 I for one am in favour of harmonising all field to follow the field API

 (PS: wasn't sure about what ticket type this should be classified as)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34569>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018823fafbce-6d0d7121-6096-4104-928d-177010633857-000000%40eu-central-1.amazonses.com.

Reply via email to