On Dec 20, 11:49 am, pk <[EMAIL PROTECTED]> wrote:
> Are you using the built-in Group and User classes? If what you are
> quoting is cut-and-pasted from your console, you maybe using your own
> model? Maybe you should show us the actual source code.
>
> FYI -- the built-in classes are django.contrib.auth.models.Group
> and ..User
> not Groups nor Users
>
OOps. just a typo. I did use the singular.  Those lines were copied
from the console, not pasted - I'm using Win200 & don't know how to
copy from the console.
My description  also did not mention the
>>>from django.contrib.auth.models import User, Group
with which I started the shell session.


The models are the built-in django models.

>>>U.all().filter(groups__name = 'Admin')
returns a list of all the users as long as any existing groups_name
is  used.

>>>U.all().filter(groups__name = 'Non_existant_groupname')
returns an empty list.

 My Django version (from django/__init__py' is
VERSION = (0, 97, 'pre')

It was an svn snapshot retrieved for me by the folks at the Satchmo
product on
9 Sep 07, labeled 'django_5947'  (if any of that means something to
you!)

-regards
-Karl
--~--~---------~--~----~------------~-------~--~----~
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