Encodage cass. a a l'air fix, mais je ne sais toujours pas vraiment d'o a vient...
darcs-hash:20070531090324-f46e9-60934f552dfa82357530d7ee093ac8ef1f614a14.gz
This commit is contained in:
parent
678220f12e
commit
1ce1644112
6 changed files with 24 additions and 21 deletions
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from cherrypy.filters.basefilter import BaseFilter
|
||||
import cherrypy, os
|
||||
from Cheetah.Template import Template
|
||||
|
@ -84,7 +85,7 @@ class TemplatesFilter(BaseFilter):
|
|||
except:
|
||||
t = Template(file='main.tmpl', searchList=[body,{'login':''},values])
|
||||
|
||||
return str(t)
|
||||
return t.__str__()
|
||||
|
||||
def goWithThisDict(self, aDict):
|
||||
body = aDict
|
||||
|
@ -93,13 +94,13 @@ class TemplatesFilter(BaseFilter):
|
|||
templatevalues = self._getBodyNameSpace(body)
|
||||
defaultvalues = {'static':self._getCorrectStaticMethod()}
|
||||
t = Template(file=bodyTemplate, searchList=[templatevalues, defaultvalues])
|
||||
body['page'] = str(t)
|
||||
body['page'] = t.__str__()
|
||||
|
||||
if not self._isStandaloneBody(body):
|
||||
body = self._useMainTemplate(body)
|
||||
else:
|
||||
body = body["page"]
|
||||
cherrypy.response.body = body
|
||||
cherrypy.response.body = body.encode("utf8")
|
||||
|
||||
|
||||
def beforeFinalize(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue