Opened 4 years ago

Closed 4 years ago

#15955 closed Bug (fixed)

WSGI howto has an error

Reported by: jblaine 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 4 years ago.
correction in the path to append the sys.path

Download all attachments as: .zip

Change History (3)

comment:1 Changed 4 years ago by aaugustin

  • Easy pickings unset
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 4 years ago by exezaid

correction in the path to append the sys.path

comment:2 Changed 4 years ago by carljm

  • Resolution set to fixed
  • Status changed from new to closed
  • UI/UX unset

This was fixed in r17022.

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