[Django]-Django query eliminate duplicates

3👍

Assuming you mean you want to avoid getting back the same record more than once, you can just add .distinct() to your queryset before evaluating it

0👍

For the record – .distinct() has some caveeats described in its documentation: http://docs.djangoproject.com/en/dev/ref/models/querysets/#distinct

Leave a comment