chercher d'abord une méthode appelée index
This commit is contained in:
parent
3664312761
commit
6264f55c6b
|
@ -245,8 +245,11 @@ class Page(object):
|
||||||
def __response(self, name, method):
|
def __response(self, name, method):
|
||||||
self.NAME = name
|
self.NAME = name
|
||||||
self.METHOD = method
|
self.METHOD = method
|
||||||
if not name: name = self.__class__.__name__
|
m = None
|
||||||
m = getattr(self, name, 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: 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
|
||||||
|
|
Loading…
Reference in New Issue