mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-03-03 10:45:49 +03:00
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
This commit is contained in:
parent
3d4f530eca
commit
1d2d881aba
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user