Put json-rpc controller in http.py
bzr revid: nicolas.vanhoren@openerp.com-20130621145455-n933uz1dcdmsv9t7
This commit is contained in:
@@ -569,11 +569,6 @@ class Home(http.Controller):
|
||||
def login(self, db, login, key):
|
||||
return login_and_redirect(db, login, key)
|
||||
|
||||
@http.route('/jsonrpc', type='json', auth="none")
|
||||
def jsonrpc(self, service, method, args):
|
||||
""" Method used by client APIs to contact OpenERP. """
|
||||
return openerp.netsvc.dispatch_rpc(service, method, args)
|
||||
|
||||
class WebClient(http.Controller):
|
||||
|
||||
@http.route('/web/webclient/csslist', type='json', auth="none")
|
||||
|
||||
@@ -1134,6 +1134,14 @@ def db_monodb():
|
||||
db = dbs[0]
|
||||
return db.lower() if db else db
|
||||
|
||||
|
||||
class JsonRpcController(Controller):
|
||||
|
||||
@route('/jsonrpc', type='json', auth="none")
|
||||
def jsonrpc(self, service, method, args):
|
||||
""" Method used by client APIs to contact OpenERP. """
|
||||
return openerp.netsvc.dispatch_rpc(service, method, args)
|
||||
|
||||
def wsgi_postload():
|
||||
openerp.wsgi.register_wsgi_handler(Root())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user