Collin, Thanks ... no I'm not saying that as I did do any assert statements. When I add that to the main calling programme, it fails with an "Assertion Error". Having not used assert statements before, I'm not sure what that means. Can you help?
What I am saying is that when from the calling programme, I call the main object with a filter, it works as expected--only members with 'Active' status. When I call the custom class (Class MemberActive) with no filter (as the filter is in the custom class), I get all records regardless of status, e.g. the custom class is running without regard to the def statement. On Monday, 3 November 2014 01:51:59 UTC, Collin Anderson wrote: > > Hello > > You are saying this doesn't work as expected? > > class MemberActive(models.Manager): > def get_queryset(self): > qs = super(MemberActive, self).get_queryset().filter(status= > 'Active') > return qs > > class Member(models.Model): > # etc > Active_objects = MemberActive() > > assert all(m.status == 'Active' for m in Member.Active_objects.all()) > > Collin > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/683fd596-567a-49ac-89b9-50e6f9231a9e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.