Code

Opened 3 years ago

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

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

Download all attachments as: .zip

Change History (3)

comment:1 Changed 3 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: 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.

Changed 3 years ago by exezaid

correction in the path to append the sys.path

comment:2 Changed 2 years ago by carljm

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

This was fixed in r17022.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.