Incorrect Configured: Error importing pp.middleware middleware: "No module named pp.middleware"

im new for django and python, im trying to make runerver on a piece of django code and im working in the following problems,

Kinnovates-MacBook-Pro:platformsite Kinnovate$ python manage.py runserver Running in development mode. Running in development mode. Running in development mode. Running in development mode. Validating models... 0 errors found Django version 1.4b1, using settings 'platformsite.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__ return self.application(environ, start_response) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 219, in __call__ self.load_middleware() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/handlers/base.py", line 47, in load_middleware raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e)) ImproperlyConfigured: Error importing middleware pp.middleware: "No module named pp.middleware" 

im running python2.7 1.4b Django on macOSX10.7 how to fix it?

+4
source share
1 answer

You have a middleware class specified in settings.MIDDLEWARE_CLASSES that Django is trying to import, but it is not available in your Python path.

You need to make sure that you get the middleware sources and that your Python path is configured correctly.

+6
source

Source: https://habr.com/ru/post/1397354/


All Articles