Posts /

Django Distinct field 에러

04 Jun 2018

개요

# 시도
ExampleModel.objects.filter(...).distinct('some_column').count()

해결

ExampleModel.objects.filter(...).values('some_column').distinct().count()

Twitter Facebook Google+