Opened 14 years ago
Closed 12 years ago
#15058 closed Bug (wontfix)
sys.path.append()
Reported by: | daghenrik | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.2 |
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
I was struggling with getting WSGI up until I found the following:
If you have been using the Django development server and have made use of the fact that it is possible when doing explicit imports, or when referencing modules in 'urls.py', to leave out the name of the site and use a relative module path, you will also need to add to sys.path the path to the site package directory itself.
sys.path.append('/usr/local/django')
sys.path.append('/usr/local/django/mysite') # This part
Reference:
http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
Attachments (1)
Change History (11)
comment:1 by , 14 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 14 years ago
Component: | Uncategorized → Documentation |
---|---|
Resolution: | wontfix |
Status: | closed → reopened |
Triage Stage: | Unreviewed → Accepted |
No - wait - on second reading -- our docs could be a little clearer. It isn't (necessarily) as simple as just putting the second entry in your PYTHONPATH, but that will be a common solution.
by , 14 years ago
Attachment: | 15058.diff added |
---|
comment:3 by , 14 years ago
Russell, I just attached a proposal, but I'm not sure it is what you had in mind.
It should at least be more beginner-friendly than the current doc.
comment:4 by , 14 years ago
Please be careful about using the reference to 'PYTHONPATH' in documentation related to mod_wsgi setup. People know 'PYTHONPATH' as the environment variable used in command line Python and occasionally have seen people think that because it was mentioned and because they had already set 'PYTHONPATH' in the user environment that everything will work under Apache. This will not be the case because Apache/mod_wsgi runs as different user and will not inherit the users environment. I would personally therefore like to see any mention of 'PYTHONPATH' dropped and simple refer to it as something """Python module search path as defined by 'sys.path'""" or something else similar.
And yes I have been lazy in still not adding a separate page to the mod_wsgi documentation explaining better the whole sys.path, module search path stuff. :-)
comment:6 by , 14 years ago
#12056 is related. It suggests changing the code and not just the docs. It contains comments by core developers.
comment:7 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:10 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
I believe this is no longer relevant after r17022
I'm going to mark this wontfix --