It's something possible to do in `django.contrib.postgres` before Django
3.1 and it can still be useful now to get non-textual data back from
database.
This would be an example of use and I show the difference with KT
{{{#!pycon
>>> qs = MyModel.objects.all()
>>> values = qs.values_list(
K("value__true"),
K("value__false"),
K("value__none"),
K("value__dict"),
K("value__list"),
)
[True, False, None, {"k": "v"}, [None, True, False]]
>>> text_values = qs.values_list(
KT("value__true"),
KT("value__false"),
KT("value__none"),
KT("value__dict"),
KT("value__list"),
)
["true", "false", "null", '{"k":"v"}', "[null,true,false]"]
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34868>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* keywords: => json key type
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/34868#comment:1>
* status: new => closed
* resolution: => wontfix
Comment:
As far as I'm aware exposing a new API is unnecessary, `F()` should work
just fine.
--
Ticket URL: <https://code.djangoproject.com/ticket/34868#comment:2>