Opened 14 years ago

Closed 13 years ago

#15955 closed Bug (fixed)

WSGI howto has an error

Reported by: Jeff Blaine Owned by: nobody
Component: Documentation Version: 1.3
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

http://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/

The following instructions are not correct, from what I can tell.

import os
import sys

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

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
path = '/path/to/mysite'
if path not in sys.path:
    sys.path.append(path)

This last block contains the error. In order to find 'mysite.settings', path should be set to '/path/to/parent/dir/of/site'.

Attachments (1)

doc-patch.diff (818 bytes ) - added by exezaid 14 years ago.
correction in the path to append the sys.path

Download all attachments as: .zip

Change History (3)

comment:1 by Aymeric Augustin, 14 years ago

Easy pickings: unset
Triage Stage: UnreviewedAccepted

There is a more general problem described by Russell here: http://groups.google.com/group/django-developers/msg/aa9a45e49e94e763?hl=en_US but I did not find a ticket for it.

I think working from that thread on django-dev is the best choice here.

by exezaid, 14 years ago

Attachment: doc-patch.diff added

correction in the path to append the sys.path

comment:2 by Carl Meyer, 13 years ago

Resolution: fixed
Status: newclosed
UI/UX: unset

This was fixed in r17022.

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