I'm trying to install django-debug-toolbar
Whenever I add the middleware in the settings, I'm getting the following error:
File "<project_path>/.env/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 153, in __init__
self.load_middleware()
File "<project_path>/.env/lib/python3.5/site-packages/django/core/handlers/base.py", line 82, in load_middleware
mw_instance = middleware(handler)
TypeError: __init__() takes 1 positional argument but 2 were given
my settings.py contains all the necessary stuff:
INSTALLED_APPS = [
#...
'django.contrib.staticfiles',
'debug_toolbar',
#...
]
MIDDLEWARE = [
'debug_toolbar.middleware.DebugToolbarMiddleware',
#....
#....
]
MIDDLEWARE_CLASSES = [
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
I had to upgrade the django-debug-toolbar
as mentioned in this answer and then add a line in the settings file:
INTERNAL_IPS = ('127.0.0.1')
to make the toolbar visible