I've upgraded to Django 1.7.1
Following the upgrade most (haven't tested all, but for all tested this true) the over-rided queryset is not functioning.
when the code calls
qs=Member.Active_objects.all()
then all members are returned, not just those which confrom to the filter specified in the Class MemberActive(models.Manager)
this all worked for many years and only now works following upgrade to 1.7.1. I upgraded just to keep up. Now regret that decision, but difficult to go back.
I've tried both get_query_set() and get_queryset() ... I understand the latter is required in 1.7.
Any suggestions?
===the code snippets:
class MemberActive(models.Manager):
def get_guery_set(self):
qs=super(MemberActive, self).get_query_set().filter(status='Active')
return qs
class Member(models.Model):
membertype=models.ForeignKey(Membertype,related_name='members',db_column='mtypeid', null=True, on_delete=models.SET_NULL,help_text='Type of member.',verbose_name='Member Type')
lname = models.CharField(max_length=150, db_column='lame', blank=True, help_text='Last name.',verbose_name='Last Name')
fname = models.CharField(max_length=150, db_column='fame', blank=True, help_text='First name.',verbose_name='First Name')
status = models.CharField(max_length=12,db_column="status", blank=True,help_text="Membership status)
objects = models.Manager() # the default manager
Active_objects = MemberActive()