~jfb-tempo-consulting/unifield-web/us-4005

« back to all changes in this revision

Viewing changes to openobject/tools/_tools.py

  • Committer: ame (Tiny)
  • Date: 2010-01-07 07:47:47 UTC
  • Revision ID: ame@tinyerp.com-20100107074747-sqc1cmm24gofqmuh
[REF] separating base API to openobject
[REF] removed all openerp related stuffs from base api

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
###############################################################################
 
2
#
 
3
# Copyright (C) 2007-TODAY Tiny ERP Pvt Ltd. All Rights Reserved.
 
4
#
 
5
# $Id$
 
6
#
 
7
# Developed by Tiny (http://openerp.com) and Axelor (http://axelor.com).
 
8
#
 
9
# The OpenERP web client is distributed under the "OpenERP Public License".
 
10
# It's based on Mozilla Public License Version (MPL) 1.1 with following
 
11
# restrictions:
 
12
#
 
13
# -   All names, links and logos of Tiny, Open ERP and Axelor must be
 
14
#     kept as in original distribution without any changes in all software
 
15
#     screens, especially in start-up page and the software header, even if
 
16
#     the application source code has been changed or updated or code has been
 
17
#     added.
 
18
#
 
19
# -   All distributions of the software must keep source code with OEPL.
 
20
#
 
21
# -   All integrations to any other software must keep source code with OEPL.
 
22
#
 
23
# If you need commercial licence to remove this kind of restriction please
 
24
# contact us.
 
25
#
 
26
# You can see the MPL licence at: http://www.mozilla.org/MPL/MPL-1.1.html
 
27
#
 
28
###############################################################################
 
29
 
 
30
import cherrypy
 
31
from formencode import NestedVariables
 
32
 
 
33
 
 
34
def nestedvars_tool():
 
35
    if hasattr(cherrypy.request, 'params'):
 
36
        cherrypy.request.params = NestedVariables.to_python(cherrypy.request.params or {})
 
37
 
 
38
cherrypy.tools.nestedvars = cherrypy.Tool("before_handler", nestedvars_tool)
 
39
cherrypy.lowercase_api = True
 
40
 
 
41