class Category(TenantAbstract): name = models.CharField(max_length=10) objects = TenantManager() def __str__(self): return self.name
class Category(TenantModel): name = models.CharField(max_length=50) objects = TenantManager.from_queryset(CategoryQuerySet)() def __str__(self): return self.name
class Product(TenantAbstract, BaseModel): name = models.CharField(max_length=50) category = models.ForeignKey('app_test.Category', on_delete=models.CASCADE) objects = TenantManager() def __str__(self): return self.name
class Product(TenantAbstract): name = models.CharField(max_length=10) category = models.ForeignKey('tests.Category', null=True, on_delete=models.SET_NULL) objects = TenantManager() def __str__(self): return self.name
class Contact(TenantAbstract): name = models.CharField(max_length=10) objects = TenantManager.from_queryset(ContactQuery)()
class TenantModel(TenantAbstract, BaseModel): objects = TenantManager() class Meta: abstract = True