﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6871	How to list a user's groups?	aaberga@…	nobody	"Using Django 0.96 I tried to get the list of a user's groups.

		currUser = djModels.User.objects.filter(username -__- exact=""aaberga"")[0]
		myGroups = currUser.groups
		
		for aG in myGroups:
			theGroup = str(aG)

The loop however fails as the the object in myGroups is not a list. This is  however what I understood from the documentation at URL http://www.djangoproject.com/documentation/authentication/.

The line I thought was answering my question is the first under the METHODS heading:

myuser.groups = [group_list]
myuser.groups.add(group, group, ...)

But I seem to have got it wrong...

Thanks and best regards
Aldo

"		closed	Documentation	0.96		invalid	User Groups	aaberga@…	Unreviewed	0	0	0	0	0	0
