You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just started integrating dts into an existing project.
I wish to have a public scheme superuser that can see all the tenants models while other tenants superusers would not be able to access other tenants data.
I have an organization app that holds a Client model which is also the tenant model.
# organization.models.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from tenant_schemas.models import TenantMixin
@python_2_unicode_compatible
class Client(TenantMixin):
name = models.CharField(max_length=100)
paid_until = models.DateField()
on_trial = models.BooleanField()
created_on = models.DateField(auto_now_add=True)
logo = models.ImageField(upload_to='logos/', null=True)
auto_create_schema = True
def __str__(self):
return self.name
The admin.py currently is just
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from organization.models import Client
admin.site.register(Client)
When I put 'organization' in the SHARED_APPS section, every tenant can see the other tenants
When I put 'organization' in the TENANT_APPS section, I get the following error running migrate_schemas:
TypeError: argument of type 'TenantQueryset' is not iterable
Is there a standard way to achieve this super-superuser access to tenants without letting others tenant superusers to see others?
Cheers
The text was updated successfully, but these errors were encountered:
Hi Y'all,
Just started integrating dts into an existing project.
I wish to have a public scheme superuser that can see all the tenants models while other tenants superusers would not be able to access other tenants data.
I have an
organization
app that holds aClient
model which is also the tenant model.The
admin.py
currently is justWhen I put
'organization'
in theSHARED_APPS
section, every tenant can see the other tenantsWhen I put
'organization'
in theTENANT_APPS
section, I get the following error runningmigrate_schemas
:Is there a standard way to achieve this
super-superuser
access to tenants without letting others tenant superusers to see others?Cheers
The text was updated successfully, but these errors were encountered: