[Django]-Difficulty installing Django Debug Toolbar

0👍

✅

You are using a development version of django Django-1.7.dev20140121103749, which is only for testing and not for production use. This is why the import is not working.

You need to use the latest release version of django, which is 1.6.1

Please download the correct version.

10👍

The problem is specifically with the signals debug panel. Apparently Django 1.7 incorporates a lot of changes to the signals library that are specifically incompatible with the debug toolbar.

You can run DDT on Django 1.7 if you disable the panel. Easy enough to do with a change to your settings.py:

DEBUG_TOOLBAR_PANELS = [
    'debug_toolbar.panels.version.VersionDebugPanel',
    'debug_toolbar.panels.timer.TimerDebugPanel',
    'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
    'debug_toolbar.panels.headers.HeaderDebugPanel',
    'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
    'debug_toolbar.panels.sql.SQLDebugPanel',
    'debug_toolbar.panels.template.TemplateDebugPanel',
    'debug_toolbar.panels.cache.CacheDebugPanel',
    #'debug_toolbar.panels.signals.SignalDebugPanel',
    'debug_toolbar.panels.logger.LoggingPanel',
    'debug_toolbar.panels.profiling.ProfilingDebugPanel',
]

If you need signal inspection, you can backport WEAKREF_TYPES from Django 1.6 django.dispatch.dispatcher into your environment and update debug_toolbar.panels.signals with the appropriate dependencies. This took me about ten minutes, but I threw that solution away when I discovered I could just disable the problem panel.

2👍

As commented in the issue, the issue with debug toolbar on Django 1.7 seems to be resolved in version 1.1 and up of django-debug-toolbar (tested 1.1 and 1.2.1 myself).

Please try upgrading and see if the issue resolves itself

Leave a comment