Cutting down the code sample I gave above in case that helps.  Code
snippet below

Again, my problem is that if I call Release.objects.planning_backlog()
it works and I get all relavant Releases.  If I call
Project.release_set.planning_backlog() I again get all Releases that
fit the filter instead of just the ones related to that Project
instance.

Hopefully that'll help tease out what I'm missing and thanks again.

class ReleaseManager(models.Manager):
    use_for_related_fields = True

    def planning_backlog(self):
        return super(ReleaseManager, self).get_query_set().filter
(development_status__in=self.DEV_REVIEW)

    ...

class Project(models.Model):
    title = models.CharField(max_length=141)
    ...


class Release(models.Model):
    project_fk = models.ForeignKey(Project)
    title = models.CharField(max_length=141)
    ...

    # Add my custom manager.
    objects = ReleaseManager()


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