These are chat archives for django/django

25th
Nov 2016
J. Dalton Childers
@jdaltonchilders
Nov 25 2016 03:44

If I’m querying a JSONField, how exactly are we suppose to check for distinct?

query_target.datapoints.all().values_list('user').distinct('user').count()

Something like this, but with in a JSONField way.

context['total_tweeters'] = Tweet.objects.filter(study=study_id).values(data='actor_id').distinct(data='actor_id').count()

I tried this, but it doens’t work. All the exampls I’ve read only focus on using filter.

:]
@elcolie
Nov 25 2016 06:42
In the testcase it has assertEqual already. Anything I miss?
Ankur sharma
@ankur1163
Nov 25 2016 11:46
am I allowed to ask questions related to python here?
I am beginner and just started learning python
Vlad Fernandes
@Vlad-Fernandes
Nov 25 2016 17:07
@herer any where i can find small django projects or team up with someone
Slava
@scream4ik
Nov 25 2016 17:27
little Q. maybe someone works with CMU Sphinks and python. I can't detect microphone device. Anyone has same issue?