[Answer]-Show all model instances regardless of site in django admin

1👍

you actually dont need CurrentSiteManager, simply connect the model to Site Model thru ForeignKey like;

from django.contrib.sites.models import Site
class Person(models.Model):
   name = models.CharField(max_length=20)
   site = models.ForeignKey(Site)
   on_site = models.ForeignKey(Site,related_name="site_users")

and in admin, you will see a dropdown to choose to which site the Person should belong to.

dont forget to migrate the model since you are changing the schema

Leave a comment