In Django, what's the difference between the following two:
Article.objects.values_list('comment_id', flat=True).distinct()
vs
Article.objects.values('comment_id').distinct()
My goal is to get a list of unique comment ids under each Article. I've read the documentation (and in fact have used both approaches). The results overtly seem similar.
if self.id in Article.objects.values_list('comment_id', flat=True):while using values you need to access the dictionary - dnaranjoArticle.objects.filter(comment_id=self.id).exists()? - Sayse