2013-01-31 13:10:51 +00:00
|
|
|
.. _routing:
|
|
|
|
|
|
|
|
Routing
|
|
|
|
=======
|
|
|
|
|
2013-02-01 09:37:27 +00:00
|
|
|
.. versionchanged:: 7.1
|
|
|
|
|
2013-01-31 13:10:51 +00:00
|
|
|
The OpenERP framework, as an HTTP server, serves a few hard-coded URLs
|
|
|
|
(``models``, ``db``, ...) to expose RPC endpoints. When running the web addons
|
|
|
|
(which is almost always the case), it also serves URLs without them being RPC
|
|
|
|
endpoints.
|
|
|
|
|
|
|
|
In older version of OpenERP, adding RPC endpoints was done by subclassing the
|
|
|
|
``openerp.netsvc.ExportService`` class. Adding WSGI handlers was done by
|
2013-02-01 15:13:54 +00:00
|
|
|
registering them with the :py:func:`openerp.wsgi.register_wsgi_handler`
|
|
|
|
function.
|
2013-01-31 13:10:51 +00:00
|
|
|
|
|
|
|
Starting with OpenERP 7.1, exposing a new arbitrary WSGI handler is done with
|
2013-02-01 15:13:54 +00:00
|
|
|
the :py:func:`openerp.http.handler` decorator while adding an RPC endpoint is
|
|
|
|
done with the :py:func:`openerp.http.rpc` decorator.
|
2013-01-31 13:10:51 +00:00
|
|
|
|
2013-02-13 13:47:07 +00:00
|
|
|
.. _routing-decorators:
|
|
|
|
|
2013-02-01 15:13:54 +00:00
|
|
|
Routing decorators
|
|
|
|
------------------
|
|
|
|
|
|
|
|
.. automodule:: openerp.http
|
|
|
|
:members:
|
|
|
|
:undoc-members:
|