From a11dd1543ca5ddd190b2c6b8b2aba5727d801e48 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Wed, 5 Mar 2014 22:54:03 +0400 Subject: [PATCH] =?UTF-8?q?s=C3=A9lectionner=20index=20en=20second=20lieu,?= =?UTF-8?q?=20pour=20compatibilit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyulib/src/ulib/web/pages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyulib/src/ulib/web/pages.py b/pyulib/src/ulib/web/pages.py index ce12ceb..5ba7236 100644 --- a/pyulib/src/ulib/web/pages.py +++ b/pyulib/src/ulib/web/pages.py @@ -246,10 +246,10 @@ class Page(object): self.NAME = name self.METHOD = method m = None - if m is None and hasattr(self, 'index'): - m = getattr(self, 'index') if m is None and hasattr(self, self.__class__.__name__): m = getattr(self, self.__class__.__name__) + if m is None and hasattr(self, 'index'): + m = getattr(self, 'index') if m is None: m = self.error # XXX Ajouter un argument en fonction de la valeur du header Accept:, pour text/plain, # text/html, application/xml et application/xhtml+xml