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 46ca676736
This commit is contained in:
Robert Sparks 2022-01-06 20:54:53 +00:00
parent da9295fe5e
commit 2a0d54afcd

View file

@ -55,3 +55,8 @@ SUBMIT_YANG_DRAFT_MODEL_DIR = 'data/developers/ietf-ftp/yang/draftmod/'
SUBMIT_YANG_INVAL_MODEL_DIR = 'data/developers/ietf-ftp/yang/invalmod/'
SUBMIT_YANG_IANA_MODEL_DIR = 'data/developers/ietf-ftp/yang/ianamod/'
SUBMIT_YANG_RFC_MODEL_DIR = 'data/developers/ietf-ftp/yang/rfcmod/'
# Set INTERNAL_IPS for use within Docker. See https://knasmueller.net/fix-djangos-debug-toolbar-not-showing-inside-docker
import socket
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
INTERNAL_IPS = [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]