From a1463c60b3c3a669d2267f8dbaec0f583519870f Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 19 Nov 2013 16:42:54 +0100 Subject: [PATCH] [CHG] **kw don't prevent url searching/listing anymore After discussion and addition of support for the methods parameter (on @route), it's been determined that: * POST endpoint must set up method correctly * **kw on GET endpoints must be completely optional, mandatory query arguments should be added as formal parameters without a default values * URLs can thus be generated for methods with **kw, simply by ignoring it entirely bzr revid: xmo@openerp.com-20131119154254-vp0zfnzjvi451vv0 --- addons/website/models/website.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/website/models/website.py b/addons/website/models/website.py index 271e225e0c5..60e680aaefc 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -318,9 +318,8 @@ class website(osv.osv): # If this is ever ported to py3, use signatures, it doesn't suck as much spec = inspect.getargspec(undecorated_func) - # if *args or **kwargs, just bail the fuck out, only dragons can - # live there - if spec.varargs or spec.keywords: + # if *args bail the fuck out, only dragons can live there + if spec.varargs: return False # remove all arguments with a default value from the list