Thursday, July 24, 2014

Re: Getting list of user groups

One issue I'm still having is actually getting the list of group names. I'm trying to use the line

groups = Group.objects.value_list('name', flat=True)

but I'm getting an error that reads 
'GroupManager' object has no attribute 'value_list'

Any idea about this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cfda2446-eb3d-4a62-b19f-643e9f08b768%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment