Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save raphaelfruneaux/2f9729915c24be64df4102783edff408 to your computer and use it in GitHub Desktop.
Save raphaelfruneaux/2f9729915c24be64df4102783edff408 to your computer and use it in GitHub Desktop.
Fix: Django Debug Toolbar not showing when using with Docker.
# If you don't do this you will have to add the host IP in INTERNAL_IPS = ('127.0.0.1',)
# And it will change, then you will have to change INTERNAL_IPS again.
def show_toolbar(request):
if request.is_ajax():
return False
return True
DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': 'config.local.show_toolbar',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment