Opened 14 years ago

Closed 14 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: no UI/UX: no

Description

Hi,

First, i'd like to say: Good work!
Second, i found some small errors in the documentation that describes Django deployment with mod_wsgi: http://docs.djangoproject.com/en/1.2/howto/deployment/modwsgi/

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,

Jan

Attachments (1)

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

Download all attachments as: .zip

Change History (6)

comment:1 by Tim Graham, 14 years ago

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 by Gabriel Hurley, 14 years ago

Keywords: deployment added

comment:3 by elbarto, 14 years ago

Owner: changed from nobody to elbarto

by elbarto, 14 years ago

Attachment: modwsgi.diff added

comment:4 by elbarto, 14 years ago

Has patch: set

comment:5 by Tim Graham, 14 years ago

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