Hello everyone,

I'm trying to do this:

.....
from user.models import Profile
Profile.objects.filter(services__count=0)
.....

As you can see, I want to retrieve all the users with no related
services. But it gives an error: "FieldError: Cannot resolve keyword
'count' into field. Choices are: blah blah.."

The services  field is generated in the model Services as a related
foreign key:

class Service(models.Model):
    creator = models.ForeignKey(Profile, related_name="services")
    .....

Any way to do this the django-way? I'm using django 1.2.3.

Thanks in advance,
    Eduardo RE

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

Reply via email to