Hi,

I have a Model Form defined like that:

class ProjectMemberForm(forms.ModelForm):
    """
    Renders a form where users can be assigned to a project.
    The ``members`` are overidden and need to be populated in the view
    with:
        form = ProjectMemberForm()
        form.base_fields['members'].queryset = ``SiteUser``
    """
    members = forms.ModelMultipleChoiceField(widget =
forms.CheckboxSelectMultiple,
                                             # TODO: shall never be
displayed, only used for testing. find a better solution
                                             queryset = None)

    class Meta:
        model = Project
        fields = ('members',)

and I add the members to the form in a view:
ProjectMemberForm.base_fields['members'].queryset = users

the "users" are a queryset of django.contrib.auth.models.User objects

this works fine and renders a form with the username, but I would like
to display the full name of the user and other information out of the
profile. Does anyone know how I can get to that information?

cheers, Tom

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

Reply via email to