Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21663 closed Bug (fixed)

sys path not set in wsgi.py

Reported by: carrie.hazelton@… 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 Tim Graham, 11 years ago

Triage Stage: UnreviewedAccepted

I believe we should mention WSGIPythonPath in the first code block and remove the unused sys import.

https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/apache-auth/#authentication-with-mod-wsgi

comment:2 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In e82e7ae1e8b7300017bb390462e5c2f7b48e2cde:

Fixed #21663 -- Added missing WSGIPythonPath in mod_wsgi config.

Thanks carrie.hazelton at altamiracorp.com for the report.

comment:3 by Tim Graham <timograham@…>, 11 years ago

In fc2c8ee4c80848a14d61d627a7fc3a8c73914afa:

[1.5.x] Fixed #21663 -- Added missing WSGIPythonPath in mod_wsgi config.

Thanks carrie.hazelton at altamiracorp.com for the report.

Backport of e82e7ae1e8 from master

comment:4 by Tim Graham <timograham@…>, 11 years ago

In 847d2ab5b3b786f735267f77dd02ba52451a1e7f:

[1.6.x] Fixed #21663 -- Added missing WSGIPythonPath in mod_wsgi config.

Thanks carrie.hazelton at altamiracorp.com for the report.

Backport of e82e7ae1e8 from master

Note: See TracTickets for help on using tickets.
Back to Top