#36616: Add DatabaseOperations.adapt_durationfield_value() hook
-------------------------------------+-------------------------------------
Reporter: Tim | Owner: Tim Graham
Graham |
Type: New | Status: assigned
feature |
Component: Database | Version: dev
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 |
-------------------------------------+-------------------------------------
The MongoDB backend has to [
https://github.com/mongodb/django-mongodb-
backend/blob/f8c95289d6555d8e135e7177dc43576c01179360/django_mongodb_backend/fields/duration.py#L7-L14
monkeypatch] `DurationField.get_db_prep_value()` to adapt the value sent
to the database.
Following the pattern of other fields, a
`DatabaseOperations.adapt_durationfield_value()` hook could be added to
remedy this.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36616>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.