Code

Opened 4 months ago

Closed 4 months ago

Last modified 4 months 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?

Attachments (0)

Change History (4)

comment:1 Changed 4 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 4 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In e82e7ae1e8b7300017bb390462e5c2f7b48e2cde:

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

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

comment:3 Changed 4 months ago by Tim Graham <timograham@…>

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 Changed 4 months ago by Tim Graham <timograham@…>

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.