0

I'm running Django 3.2 with django-tenants on a Windows local dev environment.

In my windows hosts file I have:

127.0.0.1 *.localhost

...so that I am able to use subdomains with django-tenants. E.g. http://mysub.localhost:8000.

When running ./manage.py runserver the dev server runs perfectly. However, when trying to execute urlopen in my code I get an error:

>>> html = urlopen('http://mysub.localhost:8000')
Traceback (most recent call last):
[...]
urllib.error.URLError: <urlopen error [Errno 11001] getaddrinfo failed>

As far as I can tell the error is due to the proxy settings on my windows machine (this does not fail in production), but I am unsure how to resolve it?

alias51
  • 8,178
  • 22
  • 94
  • 166

0 Answers0