sélectionner index en second lieu, pour compatibilité

This commit is contained in:
Jephte CLAIN 2014-03-05 22:54:03 +04:00
parent 6264f55c6b
commit a11dd1543c
1 changed files with 2 additions and 2 deletions

View File

@ -246,10 +246,10 @@ class Page(object):
self.NAME = name self.NAME = name
self.METHOD = method self.METHOD = method
m = None m = None
if m is None and hasattr(self, 'index'):
m = getattr(self, 'index')
if m is None and hasattr(self, self.__class__.__name__): if m is None and hasattr(self, self.__class__.__name__):
m = getattr(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 if m is None: m = self.error
# XXX Ajouter un argument en fonction de la valeur du header Accept:, pour text/plain, # XXX Ajouter un argument en fonction de la valeur du header Accept:, pour text/plain,
# text/html, application/xml et application/xhtml+xml # text/html, application/xml et application/xhtml+xml