Reputation: 507
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
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?
Upvotes: 0
Views: 322
Reputation: 156
Localhost is not a domain, it just refer to your computer. So It won't resolve any subdomain.
You could try it to add a custom domain to the /etc/hosts
file:
127.0.0.1 mycustomdomain.com subdomain.mycustomdomain.com
And try again, but replace localhost with your new domain in the configurations.
Upvotes: 0
Reputation: 507
after a day of troubleshooting, the problems seems to be with Safari. Using Edge I am able to browse to a subdomain
Upvotes: 1