Skip to content

Commit 6fae2a9

Browse files
Additional readme warning when using docker (#1294)
* adding additional readme warning for using docker https://gist.github.com/douglasmiranda/9de51aaba14543851ca3#file-option2-py * Update installation.rst fixed spelling error Co-authored-by: sarath ak <[email protected]>
1 parent 12248e7 commit 6fae2a9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/installation.rst

+11
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ You can change the logic of determining whether or not the Debug Toolbar
103103
should be shown with the :ref:`SHOW_TOOLBAR_CALLBACK <SHOW_TOOLBAR_CALLBACK>`
104104
option. This option allows you to specify a custom function for this purpose.
105105

106+
.. warning::
107+
108+
If using Docker the following will set your `INTERNAL_IPS` correctly only if you are in Debug mode.::
109+
110+
if DEBUG:
111+
import os # only if you haven't already imported this
112+
import socket # only if you haven't already imported this
113+
hostname, _, ips = socker.gethostbyname_ex(socket.gethostname())
114+
INTERNAL_IPS = [ip[:-1] + '1' for ip in ips] + ['127.0.0.1', '10.0.2.2']
115+
116+
106117
Troubleshooting
107118
---------------
108119

0 commit comments

Comments
 (0)