Fix INTERNAL_IPS for DOCKER when ip higher than 9
previously, for IP ex: 172.19.0.13 becomes: 172.19.0.11
now, it becomes 172.19.0.1
@@ -68,7 +68,7 @@ if env("USE_DOCKER") == "yes":
import socket
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
- INTERNAL_IPS += [ip[:-1] + "1" for ip in ips]
+ INTERNAL_IPS += [".".join(ip.split(".")[:-1]+["1"]) for ip in ips]
{%- endif %}
# django-extensions
