djangodjango-tenants

django_tenants not resolving subdomains


I have setup and installed django_tenants with the standard settings and middleware from the documentation and watched Tom's Youtube video.

'django_tenants.middleware.main.TenantMainMiddleware'

and the option

SHOW_PUBLIC_IF_NO_TENANT_FOUND = True

The PostgresSQL scheme segregation is working perfectly and I have created a demo tenant with host demo.localhost

enter image description here

enter image description here

I am running the server locally with

python3 manage.py runserver localhost:8000

in my browser, localhost:8000 works perfectly however the subdomain, demo.localhost:8000 is never resolved and I see no request in the terminal.

Is there something I am missing or logs I can check to try and troubleshoot?


Solution

  • after a day of troubleshooting, the problems seems to be with Safari. Using Edge I am able to browse to a subdomain