If I use the values() or values_list() the request in database has a long
waiting time and some time I also got a MemoryError (because 4GB RAM is not
enough).
My examples:
Apple.objects.select_related('Orange').filter(state='fresh').values_list(
# Fields I don't want:
'field1',
'field2',
'field3
I think a better approach to using QuerySet.defer() is to use .values()
instead, explicitly specifying which fields you need to export.
Just FYI rest_framework handles this out of the box and provides an API to
specify not only which fields to export but filters as well.
Regards
/d
On Fri, May
Hello Django community o/
I want to create a API call in order to get all data from a specific model (
table ) - but I want to exclude-remove only specific fields from this.
So, I try to find a right way to execute this difficult and "heavy"
query/request with a efficient way.
This is what I hav
3 matches
Mail list logo