Exemple #1
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Start script for the rmidb2 TurboGears project.

This script is only needed during development for running from the project
directory. When the project is installed, easy_install will create a
proper start script.
"""

import sys
from rmidb2.command import start, ConfigurationError

if __name__ == '__main__':
    try:
        start()
    except ConfigurationError, exc:
        sys.stderr.write(str(exc))
        sys.exit(1)
Exemple #2
0
import sys
sys.path.append('/opt/python/current/app')
sys.path.append('/usr/lib64/python2.7/dist-packages')
sys.path.append('/usr/lib/python2.7/dist-packages')
 
sys.stdout = sys.stderr
sys.argv = [ '', '/opt/python/current/app/rmidb2/config/prod.cfg' ]

import os
os.environ['PYTHON_EGG_CACHE'] = '/opt/python/current/app/python-eggs'

from rmidb2 import command, model
app = command.start()
# model.bootstrap_model()
# model.create_default_users()

import cherrypy._cpwsgi
application = cherrypy._cpwsgi.CPWSGIApp(app)