I'm offering a SaaS, mostly as a django dashboard and customized admin panel. Using tenants I have one schema per customer sharing a database. The problem I have is that the customer should be able to create objects through the admin page and the objects should create an url with information about the tenant. For example customer Y's url would be Y.xzxzxz.com and customer X's url would be X.xzxzxz.com. There will be multiple types of urls with the same prefix. Currently I the customers have to manually input the customer prefix. Is it possible for the Models class to know which schema is using it?
I imported Connection from django.db and then used connection.get_tenant().name and I got what I was looking for.