From 3f7e6358c02d0822c5fe1c2da72a3b32ffe12ec6 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 6 Oct 2014 23:22:10 -0400 Subject: Fix exposed functions The Page util is supposed to intercept and enable exposed pages on its own so that additional functions can be run in the generic __call__ Fix the code to check for the function argument correctly and use a different argument than the standard cherrypy one for admin pages so that we do actually land in the Page.__call__ all the time for those pages. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/util/page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipsilon/util/page.py') diff --git a/ipsilon/util/page.py b/ipsilon/util/page.py index aa075de..1548d47 100755 --- a/ipsilon/util/page.py +++ b/ipsilon/util/page.py @@ -66,7 +66,7 @@ class Page(Log): if len(args) > 0: op = getattr(self, args[0], None) - if callable(op) and getattr(self, args[0]+'.exposed', None): + if callable(op) and getattr(op, 'public_function', None): return op(*args[1:], **kwargs) else: if self._is_form_page: -- cgit