web.py: ajout de la fonction _utf8plaintext()
This commit is contained in:
parent
335ca05aaa
commit
3f464145aa
|
@ -233,6 +233,10 @@ class Page(object):
|
|||
def redirect(self, path, **kw):
|
||||
return web.redirect(web.url(path, **kw))
|
||||
|
||||
def _utf8plaintext(self, text):
|
||||
web.header("Content-Type", "text/plain; charset=utf-8", True)
|
||||
return text.encode("utf-8")
|
||||
|
||||
def r(self, name, *args, **kw):
|
||||
templatedir = getattr(self, 'TEMPLATEDIR', None)
|
||||
if templatedir is not None:
|
||||
|
|
Loading…
Reference in New Issue