I don't always run applications on localhost, but when I do, I do it the stylish way using './ runserver --ipv6'.
And yes 'localhost' resolves to both addresses.That's why your hosts file probably contains monstrosity like this:

· · Web · 0 · 0 · 2
Sign in to participate in the conversation – a Fediverse instance for & by the Chaos community