Doh, this is what happens when I post before my second dose of
caffeine, there are no negative filters there is just the exclude
method, so the original thing should be:
blog = Blog.objects.get(pk=something)
entries = blog.entry_set.exclude(user=some_user)
On Jan 26, 11:41 am, shabda <[EMAIL PRO
Should for a M2M field
ModelClass.objects.all() be same as ModelClass.objects.filter(some_m2m
= some_m2m) UNION ModelClass.objects.exclude(some_m2m = some_m2m)? If
yes then probably there is a bug. To test define a model class as in
[1]. Do the tests like in [2]. You .all() does not give same resu
Blog.entry_set.filter(user__ne=some_uesr)
On Jan 26, 6:14 am, shabda <[EMAIL PROTECTED]> wrote:
> I have the model like,
>
> class Blog(models.Model):
> url = models.URLField()
>
> class Entry(models.Model):
> blog = models.ForeignKey(Blog)
> user = models.ManyToManyField(User)
>
> Us
I have the model like,
class Blog(models.Model):
url = models.URLField()
class Entry(models.Model):
blog = models.ForeignKey(Blog)
user = models.ManyToManyField(User)
User is contrib.auth.db.USER
Now I given a blog and a user I need to find out all the Entry objects
which are a det
4 matches
Mail list logo