Hi all,

I have a newform GroupSelectionForm with:
    group_id = forms.ModelChoiceField(Group.objects.all())
where users are supposed to choose their primary group.

However I only want to offer them groups in which they have
membership. I.e. instead of Group.objects.all() do something like
Group.objects.filter(...) or user.groups.all().

But how do I pass the 'user' object to the Form so I can use it in
filter() or run .groups.all() on it?

Thanks!

JohnDohn


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to