Q:

Django users: get list of group, or how to convert MultipleChoiceField to ChoiceField

I've searched similar topics but haven't found what I need..
I extended Users model with UserAttributes model, some additional fields added and etc.. now I'm trying to make ModelForm out this.. so I have a little problem in here.. 
I WANT TO list groups as a ChoiceField not a MultipleChoiceField.. It's a requirement by specification so it must be so.
so here's the code..
from django.forms               import ModelForm
from django.contrib.auth.models import User
from helpdesk.models.userattributes      import *
from django.utils.translation import ugettext as _

class SettingsOperatorsForm(ModelForm):

    groups = forms.ChoiceField(
        label=_(u'Rights'),
        required=True,
        choices=["what's in here?"]
    )

    class Meta:
        model   = UserAttributes
        fields  = ('first_name', 'last_name', 'job_title', 'email', 'password', 'is_active', 'groups'  )

there's auth_group table in database, so i tried to make it like this , but I've got a no form displayed at all:
from django.contrib.auth.models import User, Group

groups = forms.ChoiceField(
    label=_(u'Rights'),
    required=True,
    choices=Group.objects.all()
)

I think it's better would be just to convert multipleChoiceField to ChoiceField
in plain talk:

should become just SELECT box.

A:

Setting the choices at form definition time, as you do in your answer, will mean that the form will never see any new Groups that are defined.
Rather than using a ChoiceField with a list comprehension for choices, you should use a ModelChoiceField with a queryset parameter:
groups = forms.ModelChoiceField(queryset=Group.objects.all())

A:

it appears that it's that modelchoice would be wrong because current group in edit form will not be selected="Selected"
so this is solution FINALLY:
groups = forms.ModelMultipleChoiceField( 
    queryset=None, 
    required=True, 
    widget=GroupsSelect,
)

 def __init__(self, *args, **kw):  
    super(ModelForm, self).__init__(*args, **kw)
    self.fields['groups'].queryset=Group.objects.filter(user=self.instance.id)

#view
op = UserAttributes.objects.get(id=operator_id)
form = SettingsOperatorsForm(instance=op)

