corrections diverses

This commit is contained in:
Jephte CLAIN 2014-03-05 23:33:42 +04:00
parent a11dd1543c
commit 6652b8ce2d
1 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@ from os import path
from ulib.base.base import isstr, isbool, isnum, isflt, seqof, make_prop
from ulib.base.uio import _u, Utf8IO
from ulib.base.output import enote
from ulib.base.output import enote, edebug
from ulib.base.args import get_args
from ulib.base.dates import rfc2822
from ulib.base.functions import apply_args
@ -246,11 +246,14 @@ class Page(object):
self.NAME = name
self.METHOD = method
m = None
if m is None and name is not None and hasattr(self, name):
m = getattr(self, name)
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
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
return apply_args(m, method)
@ -337,6 +340,7 @@ class Application(object):
est prévue pour être dérivée.
"""
if web.config.debug:
edebug(u"Configuration des routes: %s" % str(self.webapp.mapping))
enote(u"Lancement du serveur sur http://%s:%i" % (self.HOST, self.PORT))
def new_render(self, templatedir=None):