mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-08 14:04:52 +03:00
Add all internal IPs for multiple docker networks
When developing with modified docker-compose.yml that contains multiple network definitions, all networks gateways of the created container should be added to INTERNAL_IPS, otherwise Django-Debug-Toolbar will not work.
This commit is contained in:
parent
1452fe6ecd
commit
b9859340b8
|
@ -61,8 +61,8 @@ import socket
|
||||||
import os
|
import os
|
||||||
# tricks to have debug toolbar when developing with docker
|
# tricks to have debug toolbar when developing with docker
|
||||||
if os.environ.get('USE_DOCKER') == 'yes':
|
if os.environ.get('USE_DOCKER') == 'yes':
|
||||||
ip = socket.gethostbyname(socket.gethostname())
|
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
||||||
INTERNAL_IPS += [ip[:-1] + '1']
|
INTERNAL_IPS += [ip[:-1] + '1' for ip in ips]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
DEBUG_TOOLBAR_CONFIG = {
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
'DISABLE_PANELS': [
|
'DISABLE_PANELS': [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user