Error Importing Middleware Debug Toolbar .middleware
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up django.core.exceptions.ImproperlyConfigured: Error importing middleware debug_toolbar.middleware: “No module named 'thread'” up vote 1 down vote favorite I get "500 Internal Server Error" when I'm trying to enable django-debug-tool-bar. It's already installed and I have pasted this in settings.py : if DEBUG: INTERNAL_IPS = ('127.0.0.1',) MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) INSTALLED_APPS += ( 'debug_toolbar', ) 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.profiling.ProfilingDebugPanel', '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_CONFIG = { 'INTERCEPT_REDIRECTS': False, } My apache doesn't want to load properly the middleware : apache error log : Traceback (most recent call last): File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/wsgi.py", line 236, in __call__ self.load_middleware() File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py", line 53, in load_middleware raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e)) django.core.exceptions.ImproperlyConfigured: Error importing middleware debug_toolbar.middleware: "No module named 'thread'" I have tried to add the debug-toolbar-middleware at the top of the list but nothing change. I'am using django 1.5 and python 3.3 and I have installed debug-toolbar with python3.3 setup.py install What am I not seeing ? python django apache mod-wsgi django-debug-toolbar share|improve this question edited Sep 6 '13 at 9:16 asked Sep 6 '13 at 8:19 HydrUra 382215 it the path to get access to the file missing for apache. –drabo200
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 http://stackoverflow.com/questions/18653089/django-core-exceptions-improperlyconfigured-error-importing-middleware-debug-to million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ImproperlyConfigured: Error importing middleware django.contrib.admindocs.middleware: “No module named middleware” up vote 0 down vote favorite I'm trying to install webpymail (https://code.google.com/p/webpymail/wiki/Installation), I did everything as is said in the tutorial, but upon starting the app I get http://stackoverflow.com/questions/18867686/improperlyconfigured-error-importing-middleware-django-contrib-admindocs-middle A server error occurred. Please contact the administrator. and in server logs ImproperlyConfigured: Error importing middleware django.contrib.admindocs.middleware: "No module named middleware" What could be the cause of that and how do I fix it? javascript python django email webmail share|improve this question asked Sep 18 '13 at 8:48 Xeen 2,73862153 If you have django.contrib.admindocs.middleware in your apps list, then remove .middleware part or comment out the line –mariodev Sep 18 '13 at 9:00 add a comment| 3 Answers 3 active oldest votes up vote 1 down vote This is a spot where you need to pay close attention to the version of the documentation you're reading. If you're on Django 1.5 or lower, use: 'django.middleware.doc.XViewMiddleware', If you're on Django 1.6 or greater, use: 'django.contrib.admindocs.middleware.XViewMiddleware', share|improve this answer answered Oct 3 '13 at 18:09 shacker 5,75433344 add a comment| up vote 0 down vote I ran into the same problem a few days ago... add 'django.contrib.admindocs,' to your INSTALLED_APPS add 'django.contrib.admin
Sign in Pricing Blog https://github.com/jazzband/django-debug-toolbar/issues/522 Support Search GitHub This repository Watch 118 Star 3,820 Fork 695 jazzband/django-debug-toolbar Code Issues 33 Pull requests 9 Projects http://django-debug-toolbar.readthedocs.io/en/stable/installation.html 0 Wiki Pulse Graphs New issue ImportError: cannot import name DebugToolbar #522 Closed julen opened this Issue Jan 7, 2014 error importing · 6 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 3 participants julen commented Jan 7, 2014 Hi, Just upgraded django-debug-toolbar to 1.0.1 (thanks for the extensive cleanup and improvements!) error importing middleware in my virtualenv from an older version, followed the new installation instructions but I get the following traceback: Validating models... Unhandled exception in thread started by
the code¶ The recommended way to install the Debug Toolbar is via pip: $ pip install django-debug-toolbar If you aren't familiar with pip, you may also obtain a copy of the debug_toolbar directory and add it to your Python path. To test an upcoming release, you can install the in-development version instead with the following command: $ pip install -e git+https://github.com/jazzband/django-debug-toolbar.git#egg=django-debug-toolbar Prerequisites¶ Make sure that 'django.contrib.staticfiles' is set up properly and add 'debug_toolbar' to your INSTALLED_APPS setting: INSTALLED_APPS = [ # ... 'django.contrib.staticfiles', # ... 'debug_toolbar', ] STATIC_URL = '/static/' If you're upgrading from a previous version, you should review the change log and look for specific upgrade instructions. URLconf¶ Add the Debug Toolbar's URLs to your project's URLconf as follows: from django.conf import settings from django.conf.urls import include, url if settings.DEBUG: import debug_toolbar urlpatterns += [ url(r'^__debug__/', include(debug_toolbar.urls)), ] This example uses the __debug__ prefix, but you can use any prefix that doesn't clash with your application's URLs. Note the lack of quotes around debug_toolbar.urls. Middleware¶ The Debug Toolbar is mostly implemented in a middleware. Enable it in your settings module as follows: MIDDLEWARE = [ # ... 'debug_toolbar.middleware.DebugToolbarMiddleware', # ... ] Old-style middleware: MIDDLEWARE_CLASSES = [ # ... 'debug_toolbar.middleware.DebugToolbarMiddleware', # ... ] Warning The order of MIDDLEWARE and MIDDLEWARE_CLASSES is important. You should include the Debug Toolbar middleware as early as possible in the list. However, it