#21663 closed Bug (fixed)
sys path not set in wsgi.py
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In reference to the wsgi.py example provided in Authenticating against Django’s user database from Apache for Django v1.6:
I encountered an error when trying to enable the django authentication with Apache and wsgi. The error stated that it couldn't find mysite.settings. I searched around online and some folks suggested setting the system path:
sys.path.append(<mysite.com directory path>)
Thankfully, it resolved the issue. I noticed in the wsgi.py example code in the documentation that there is an import sys statement, but the library doesn't appear to be used. Is there a missing sys.path.append statement in the documentation?
Change History (4)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I believe we should mention
WSGIPythonPath
in the first code block and remove the unusedsys
import.https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/apache-auth/#authentication-with-mod-wsgi