Adrian Holovaty wrote:
On 11/22/05, plisk <[EMAIL PROTECTED]> wrote:
pc.get_user_list(groups__name__exact='Tech')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
    return args[0](*(args[1:]+moreargs), **dict(kwargs.items() +
morekwargs.items()))
TypeError: method_get_many_to_many() got an unexpected keyword argument
'groups__name__exact'

Seems like get_xxx_list in many to many relations doesn't support
lookups ? Or is this a bug ?

Does the following work?

"""
from django.models.auth import users
users.get_list(groups__name__exact='Tech')
"""

Yes, this one works fine. And just pc.get_user_list() also works, but with arguments it fails. Tried plain pc.get_user_list(username__exact='admin') and got the same error. By the way, rev 1350.

Behind the scenes, pc.get_user_list() is just a wrapper around
users.get_list(). So a good way to test things in this case is to use
users.get_list(). If the parameters aren't valid there, they won't be
valid in pc.get_user_list().

        In users.get_list() everything works as it should..

plisk

Reply via email to