mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 13:14:28 +03:00
Add all internal IPs for multiple docker networks (#1520)
* 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. * Add @flyudvik to contributors
This commit is contained in:
parent
0bd019deb0
commit
6c8538abfe
|
@ -116,6 +116,7 @@ Listed in alphabetical order.
|
||||||
Luis Nell `@originell`_
|
Luis Nell `@originell`_
|
||||||
Lukas Klein
|
Lukas Klein
|
||||||
Lyla Fischer
|
Lyla Fischer
|
||||||
|
Malik Sulaimanov `@flyudvik`_ @flyudvik
|
||||||
Martin Blech
|
Martin Blech
|
||||||
Mathijs Hoogland `@MathijsHoogland`_
|
Mathijs Hoogland `@MathijsHoogland`_
|
||||||
Matt Braymer-Hayes `@mattayes`_ @mattayes
|
Matt Braymer-Hayes `@mattayes`_ @mattayes
|
||||||
|
@ -196,6 +197,7 @@ Listed in alphabetical order.
|
||||||
.. _@eraldo: https://github.com/eraldo
|
.. _@eraldo: https://github.com/eraldo
|
||||||
.. _@eriol: https://github.com/eriol
|
.. _@eriol: https://github.com/eriol
|
||||||
.. _@eyadsibai: https://github.com/eyadsibai
|
.. _@eyadsibai: https://github.com/eyadsibai
|
||||||
|
.. _@flyudvik: https://github.com/flyudvik
|
||||||
.. _@garry-cairns: https://github.com/garry-cairns
|
.. _@garry-cairns: https://github.com/garry-cairns
|
||||||
.. _@garrypolley: https://github.com/garrypolley
|
.. _@garrypolley: https://github.com/garrypolley
|
||||||
.. _@goldhand: https://github.com/goldhand
|
.. _@goldhand: https://github.com/goldhand
|
||||||
|
|
|
@ -64,8 +64,8 @@ INTERNAL_IPS = ['127.0.0.1', '10.0.2.2']
|
||||||
import socket
|
import socket
|
||||||
import os
|
import os
|
||||||
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 %}
|
||||||
|
|
||||||
# django-extensions
|
# django-extensions
|
||||||
|
|
Loading…
Reference in New Issue
Block a user