Opened 12 years ago

Last modified 12 years ago

#18496 closed Uncategorized

wsgi.py script need to add project path to sys.path — at Initial Version

Reported by: medhat.gayed@… Owned by: nobody
Component: Uncategorized Version: 1.4
Severity: Normal Keywords: wsgi, sys.path
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

In Django 1.4, the default wsgi.py script should append the project path to sys.path in order for the apache wsgi process to be able to import from the project apps.

Something along these lines:

import sys

path = os.path.abspath(os.path.join(file, '..', '..'))

if path not in sys.path:

sys.path.append(path)

Change History (0)

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