I need a list of all IDs for model records. So, I do this
concept_ids = Concept.objects.values_list('concept_id', flat=True)

concept_ids is a ValuesListQuerySet - I got it. According to docs
since ValuesListQuerySet is a subclass of QuerySet I can do
list(concept_ids) - see
https://docs.djangoproject.com/en/dev/ref/models/querysets/#when-querysets-are-evaluated

However, I am getting on this line
'ValuesListQuerySet' object has no attribute 'META' error.

For the sake of experimentation, if I try
concept_ids = list(Concept.objects.all())

I am getting 'QuerySet' object has no attribute 'META'. But this is
like in docs (see link above):
entry_list = list(Entry.objects.all())

What am I doing wrong?

Thanks,

Serge

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to