Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

vigigraph / deployment / vigigraph.wsgi @ f1fa35ac

History | View | Annotate | Download (797 Bytes)

1
# -*- coding: utf-8 -*-
2
# vim: set fileencoding=utf-8 sw=4 ts=4 et ft=python :
3

    
4
#import os, sys
5
#from pkg_resources import get_distribution
6

    
7
#egg_file = get_distribution('vigiboard').egg_info
8

    
9
#os.environ['PYTHON_EGG_CACHE'] = '/tmp/vigiboard/python-eggs'
10

    
11
import os.path
12
ini_file = '/etc/vigilo/vigigraph/settings.ini'
13
ini_file = os.path.join('/', *ini_file.split('/'))
14

    
15
from paste.deploy import loadapp
16
application = loadapp('config:%s' % ini_file)
17

    
18
from paste.script.util.logging_config import fileConfig
19
fileConfig(ini_file)
20

    
21
# Le chargement par TestApp est nécessaire pour éviter
22
# des problèmes de concurrence entre les threads.
23
# Cf. http://groups.google.com/group/turbogears/browse_thread/thread/0ca4e3fd12a49d44
24
import paste.fixture
25
app=paste.fixture.TestApp(application)
26
app.get("/")