V
V
vfvnvsyevsky2015-03-15 02:10:52
Django
vfvnvsyevsky, 2015-03-15 02:10:52

How to prevent Django from returning fields with the same values ​​in a queryset?

When using the distinct method, it throws an error:
DISTINCT ON fields is not supported by this database backend

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Klimenko, 2015-03-15
@aklim007

>DISTINCT ON fields is not supported by this database backend
Well, the normal way, as you indicated, does not work.
Then either change the query itself so that it does not return duplicate values, or get records along with duplicates and leave only unique ones using pion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question