Monday, December 29, 2014

Show Django-Debug-Toolbar when development IP addresses are dynamic (Vagrant, Landrush, etc.)

In certain circumstances, your IP address in development changes and therefore it's hard to have all the IP address in the list of INTERNAL_IPS that Django Debug Toolbar uses.  In your settings file (you separate them out right?), you can add this to shortcircuit the logic and allow ANY IP address (be careful):
def show_toolbar(request):
return True

'SHOW_TOOLBAR_CALLBACK': 'YourAppName.settings.development.show_toolbar',

No comments:

Post a Comment