~launchpad-results/launchpad-results/trunk

« back to all changes in this revision

Viewing changes to buildout-templates/bin/site.wsgi.in

  • Committer: Marc Tardif
  • Date: 2011-11-22 20:30:35 UTC
  • Revision ID: marc.tardif@canonical.com-20111122203035-gf3yiv7iqwgwbss0
Fixed login for user created from submission and incorrect CAPTURE devices.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2010-2011 Canonical Ltd.  This software is licensed under the
 
2
# GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
# Initialize our paths.
 
5
${python-relative-path-setup}
 
6
import sys
 
7
sys.path.insert(0, ${scripts:parts-directory|path-repr})
 
8
 
 
9
# Delete the site module from sys instead of reloading it
 
10
# because modules are chained together by their imports
 
11
if "site" in sys.modules:
 
12
    del sys.modules["site"]
 
13
import site
 
14
 
 
15
import os
 
16
os.environ.setdefault("LPRESULTS_TRACKER_SETTINGS", os.path.join(
 
17
    ${buildout:directory|path-repr}, 'configs',
 
18
    '${buildout:config}', 'settings.conf'))
 
19
 
 
20
from lpresults.tracker.wsgi import WSGIHandler
 
21
 
 
22
application = WSGIHandler()