Opened 8 years ago

Closed 7 years ago

#14277 closed (fixed)

Error in documentation for mod_wsgi

Reported by: nietpiet Owned by: elbarto
Component: Documentation Version: 1.2
Severity: Keywords: deployment mod_wsgi
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:



First, i'd like to say: Good work!
Second, i found some small errors in the documentation that describes Django deployment with mod_wsgi:

The documentation says to

add "sys.path.append('/usr/local/django') just above the final import line to place your project on the path."

This is not correct. It should not be "above", it should be "below", ie, after importing sys: "just after the 'import sys' line to place your project on the path"
It does not work if you append a path to sys before importing sys itself. (Shoule be obvious but better to have it correct)

Further.. it is a little unclear that "/usr/local/django" is intended to be the same as "/path/to/mysite" which is used for the WSGIScriptAlias at the beginning of the document; while at the end of the document it suddenly changes again to: WSGIScriptAlias / /usr/local/wsgi/scripts/django.wsgi
This is not very clear, I think it is better to be consistent for file paths.
So, perhaps it is better to either use /path/to/mysite or alternatively, give a disclaimer that the local files are stored at /usr/local/django or at /usr/local/wsgi

Keep up the good work!

Kind regards,


Attachments (1)

modwsgi.diff (841 bytes) - added by elbarto 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 years ago by Tim Graham

Has patch: unset
Triage Stage: UnreviewedAccepted

Regarding point 1, it's actually correct since the final import line in the code sample is import django.core.handlers.wsgi, although I agree it could be clearer.

comment:2 Changed 8 years ago by Gabriel Hurley

Keywords: deployment added

comment:3 Changed 7 years ago by elbarto

Owner: changed from nobody to elbarto

Changed 7 years ago by elbarto

Attachment: modwsgi.diff added

comment:4 Changed 7 years ago by elbarto

Has patch: set

comment:5 Changed 7 years ago by Tim Graham

Resolution: fixed
Status: newclosed

(In [15099]) [1.2.X] Fixed #14277 - Clarify path names in modwsgi docs; thanks neitpiet for the report, elbarto for the patch.

Backport of r15098 from trunk.

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