1👍
✅
This has nothing to do with middleware, that’s just where the error was encountered. The error itself is the last line: “Could not import settings ‘myapp.settings'”. This is almost certainly because you haven’t modified the PYTHONPATH – either in your wsgi or your Apache conf – to put “myapp” on the path.
See for instance the example Apache conf in the Django docs – there’s a WSGIPythonPath
directive there to add the app to the Python path, which you don’t have.
0👍
Placing a WSGIPythonPath directive in the httpd.conf prevented the server from starting, but the problem was indeed related to the path not being declared.
Adding:
sys.path.append("c:/wamp/www/myapp")
to the wsgi.py file did the trick.
Thanks to Daniel Roseman for putting me on the right track.
- [Answer]-Saving additional information to the database conditionally when using a modelfrom in django
- [Answer]-Django autocomplete search by tag and render Tag List
- [Answer]-Django 1.5 Custom User Model not validating in templates
- [Answer]-Django test client get row id from query
Source:stackexchange.com