Created
February 28, 2012 19:21
-
-
Save unbit/1934527 to your computer and use it in GitHub Desktop.
openerp .wsgi file for uWSGI and mod_wsgi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openerp | |
try: | |
import uwsgi | |
uwsgi.port_fork_hook = openerp.wsgi.core.on_starting | |
except: | |
openerp.wsgi.core.on_starting() | |
# Equivalent of --load command-line option | |
openerp.conf.server_wide_modules = ['web'] | |
# internal TODO: use openerp.conf.xxx when available | |
conf = openerp.tools.config | |
# Path to the OpenERP Addons repository (comma-separated for | |
# multiple locations) | |
conf['addons_path'] = '/home/openerp/addons/trunk,/home/openerp/web/trunk/addons' | |
# Optional database config if not using local socket | |
#conf['db_name'] = 'mycompany' | |
#conf['db_host'] = 'localhost' | |
#conf['db_user'] = 'foo' | |
#conf['db_port'] = 5432 | |
#conf['db_password'] = 'secret' | |
# OpenERP Log Level | |
# DEBUG=10, DEBUG_RPC=8, DEBUG_RPC_ANSWER=6, DEBUG_SQL=5, INFO=20, | |
# WARNING=30, ERROR=40, CRITICAL=50 | |
# conf['log_level'] = 20 | |
# If --static-http-enable is used, path for the static web directory | |
#conf['static_http_document_root'] = '/var/www' | |
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | |
application = openerp.wsgi.core.application |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://help.openerp.com/question/300/no-handler-found-error-how-to-fix-it/