Michael Hall has proposed merging lp:~mhall119/loco-directory/add-wsgi into lp:loco-directory.
Requested reviews: loco-directory-dev (loco-directory-dev) For more details, see: https://code.launchpad.net/~mhall119/loco-directory/add-wsgi/+merge/78598 Adds a wsgi file so we can stop using mod_python -- https://code.launchpad.net/~mhall119/loco-directory/add-wsgi/+merge/78598 Your team loco-directory-dev is requested to review the proposed merge of lp:~mhall119/loco-directory/add-wsgi into lp:loco-directory.
=== added file 'loco_directory/django.wsgi' --- loco_directory/django.wsgi 1970-01-01 00:00:00 +0000 +++ loco_directory/django.wsgi 2011-10-07 13:40:41 +0000 @@ -0,0 +1,21 @@ +import os +import sys + +import django.core.handlers.wsgi + +# add path to sttings to system path if not already there +# check if path is already there to avoid path duplication when +# modwsgi is configured for code reloading +curdir = os.path.abspath(os.path.dirname(__file__)) +if curdir not in sys.path: + sys.path.append(curdir) +parentdir = os.path.join(curdir, '..') +if parentdir not in sys.path: + sys.path.append(parentdir) + +# setup environment +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +# setup application +application = django.core.handlers.wsgi.WSGIHandler() +
_______________________________________________ Mailing list: https://launchpad.net/~loco-directory-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~loco-directory-dev More help : https://help.launchpad.net/ListHelp

