Skip to content

Commit 2a0d54a

Browse files
committed
Merged in [19811] from lars@eggert.org:
When using Docker, the runserver isn't being accessed over loopback, so we need to initialize INTERNAL_IPS based on the current interface configuration. - Legacy-Id: 19814 Note: SVN reference [19811] has been migrated to Git commit 46ca676
1 parent da9295f commit 2a0d54a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

docker/configs/settings_local.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,8 @@
5555
SUBMIT_YANG_INVAL_MODEL_DIR = 'data/developers/ietf-ftp/yang/invalmod/'
5656
SUBMIT_YANG_IANA_MODEL_DIR = 'data/developers/ietf-ftp/yang/ianamod/'
5757
SUBMIT_YANG_RFC_MODEL_DIR = 'data/developers/ietf-ftp/yang/rfcmod/'
58+
59+
# Set INTERNAL_IPS for use within Docker. See https://knasmueller.net/fix-djangos-debug-toolbar-not-showing-inside-docker
60+
import socket
61+
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
62+
INTERNAL_IPS = [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]

0 commit comments

Comments
 (0)