Is it possible to use the CurrentSiteManager to check the site of a related object - not the site of the object itself?
So, given the following models:-
class A(models.Model):
site = models.ForeignKey(Site)
class B(models.Model):
a = models.ForeignKey(A)
I want to use the following manager on B:-
on_site = CurrentSiteManager('a__site')
Otherwise, I'll have to add site as a ForeignKey to both A and B and manage all the issues that come with that.
But it looks like the CurrentSiteManager wants the 'site' field to be on the B class, not on A.
Is my only solution to write my own CurrentSiteManager?