Merge lp:~mhall119/loco-team-portal/add-wsgi into lp:loco-team-portal

Proposed by Michael Hall
Status: Merged
Approved by: Chris Johnston
Approved revision: 488
Merged at revision: 488
Proposed branch: lp:~mhall119/loco-team-portal/add-wsgi
Merge into: lp:loco-team-portal
Diff against target: 25 lines (+21/-0)
1 file modified
loco_directory/django.wsgi (+21/-0)
To merge this branch: bzr merge lp:~mhall119/loco-team-portal/add-wsgi
Reviewer Review Type Date Requested Status
Chris Johnston Approve
Review via email: mp+78598@code.launchpad.net

Commit message

Adds a wsgi file so we can stop using mod_python

Description of the change

Adds a wsgi file so we can stop using mod_python

To post a comment you must log in.
Revision history for this message
Chris Johnston (cjohnston) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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:48:25 +0000
@@ -0,0 +1,21 @@
1import os
2import sys
3
4import django.core.handlers.wsgi
5
6# add path to sttings to system path if not already there
7# check if path is already there to avoid path duplication when
8# modwsgi is configured for code reloading
9curdir = os.path.abspath(os.path.dirname(__file__))
10if curdir not in sys.path:
11 sys.path.append(curdir)
12parentdir = os.path.join(curdir, '..')
13if parentdir not in sys.path:
14 sys.path.append(parentdir)
15
16# setup environment
17os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
18
19# setup application
20application = django.core.handlers.wsgi.WSGIHandler()
21

Subscribers

People subscribed via source and target branches