Opened 7 years ago

Closed 7 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


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:

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 7 years ago.
correction in the path to append the sys.path

Download all attachments as: .zip

Change History (3)

comment:1 Changed 7 years ago by Aymeric Augustin

Easy pickings: unset
Triage Stage: UnreviewedAccepted

There is a more general problem described by Russell here: but I did not find a ticket for it.

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

Changed 7 years ago by exezaid

Attachment: doc-patch.diff added

correction in the path to append the sys.path

comment:2 Changed 7 years ago by Carl Meyer

Resolution: fixed
Status: newclosed
UI/UX: unset

This was fixed in r17022.

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