[Fixed]-Django-subdomains config localhost

1👍

Simply had to restart the dev server. All was configured correctly.

0👍

Try http://api.127.0.0.1.xip.io:8000/ with your dev server running at 127.0.0.1:8000. Since 127.0.0.1 isn’t really a domain but an IP, it can’t have subdomains. And since your hosts file redirects to 127.0.0.1 not 127.0.0.1.xip.io or similar (you don’t have to do it for testing either) you won’t be connected.
I haven’t used the library that you mentioned but from experience with self-written snippets for subdomains, I’d say this is the case.

Leave a comment