Skip to content

Commit b50b92d

Browse files
committed
Add django debug toolbar to docker development environment
1 parent 1488bce commit b50b92d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

main/settings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212

1313
import os
14+
import socket
1415

1516
from django.contrib.messages import constants as message_constants
1617
from prettyconf import config
@@ -36,7 +37,11 @@
3637
)
3738

3839
if DEBUG:
40+
# tricks to have debug toolbar when developing with docker
41+
local_ip = socket.gethostbyname(socket.gethostname())
42+
docker_gateway = local_ip[:-1] + '1'
3943
INTERNAL_IPS = [
44+
docker_gateway,
4045
'localhost',
4146
'127.0.0.1',
4247
'0.0.0.0',

0 commit comments

Comments
 (0)