How can I use Django Debug Toolbar in Heroku when I don't know the IP address so this:
INTERNAL_IPS = ('127.0.0.1', )
Always fails.
I have the following in my settings.py, which works both locally and when I deploy to Heroku:
MIDDLEWARE_CLASSES = (
...
'debug_toolbar.middleware.DebugToolbarMiddleware'
...
)
if DEBUG is True:
INSTALLED_APPS += (
'debug_toolbar',
)
if DEBUG is True:
class AllIPS(list):
def __contains__(self, item):
return True
INTERNAL_IPS = AllIPS()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With