Show debug toolbar only on DEBUG
Showing it when DEBUG=False fails because we are not registering the URLs on
DEBUG=False. Also, leaving just the default value does not work because it
checks for the IP to be an INTERNAL_IP, which is not the case on Docker.
@@ -80,8 +80,12 @@ class DockerBaseSettings(CommunityDevSettings):
}
}
+ def show_debug_toolbar(request):
+ from django.conf import settings
+ return settings.DEBUG
+
DEBUG_TOOLBAR_CONFIG = {
- 'SHOW_TOOLBAR_CALLBACK': lambda request: True,
+ 'SHOW_TOOLBAR_CALLBACK': show_debug_toolbar,
}
ACCOUNT_EMAIL_VERIFICATION = "none"
