Opened 15 years ago

Closed 15 years ago

#11344 closed (fixed)

Update Documentation About Mod-wsgi/django installation

Reported by: nartzpod Owned by: nobody
Component: Documentation Version: 1.0
Severity: 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 this page of the docs:
http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#howto-deployment-modwsgi

When install mod-wsgi, it says:


import os
import sys

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

If your project is not on your PYTHONPATH by default you can add:

sys.path.append('/usr/local/django')

just above the import line to place your project on the path. Remember to replace 'mysite.settings' with your correct settings file.


  1. It says that the code sys.path.append('/usr/local/django') should be added above the import statement; this is ambiguous, because there are in fact 3 import statements - it should specify above the 'import django.core.handlers.wsgi' statement but below the other two import statements
  1. It says to put sys.path.append('/usr/local/django') ; however, instead, it should say to put a link to where your python path is stored, i.e. sys.path.append('/path/to/django'), because not everyone symlinks their stuff into /usr/local/django; instead, it should suggest finding the python path and putting it in here; to find the python path, type python, then import django, then type django, and use that path.

Thanks!

Change History (2)

comment:1 by Karen Tracey, 15 years ago

Component: UncategorizedDocumentation
Triage Stage: UnreviewedAccepted

Note the sys.append is for placing your project's path into the python path, not the path to django itself. If someone has figured out how to get as far as trying to deploy with mod_wsgi without having django in the default python path, they likely aren't going to need detailed instructions on finding it, so I think the 2nd point can be effectively dealt with by adding a note similar to the one for mysite.settings, which should also serve to reinforce that the path being talked about here is the project path.

comment:2 by Karen Tracey, 15 years ago

Resolution: fixed
Status: newclosed

(In [11080]) [1.0.X] Fixed #11344 -- Made a couple of minor clarifications to the mod_wsgi deployment doc. Thanks nartzpod and achew22.

r11079 from trunk.

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