Blog信息 |
blog名称: 日志总数:1304 评论数量:2242 留言数量:5 访问次数:7594291 建立时间:2006年5月29日 |

| |
[Quixote]Quixote + Apache with ModPython + AdoDB + Mysql 软件技术
lhwork 发表于 2007/2/2 17:44:30 |
服务器已经搭好了,其实quixote本身的demo已经够完善的了,开源的code也许都有一个特点,code是给你看的,tutorial就在code里面。
Mod_python编译好以后,在Apache里面LoadModule一下,接着定义一个Location用quixote的publisher来处理,这段在PYTHON_LIB_PATH/site-packages/quixote/server/mod_python_handler.py的注释里面有。
我的Apache默认的charset是utf-8的,我想把quixote的也弄成utf-8的,maillist上的一个朋友给了我帮助。
“
必须得改publish.py文件找到start_request,改成下面的,我在2.2/2.3上试过.def start_request(self): """Called at the start of each request. """ # Modified by Devin — from iso-8859-1 to utf-8 request = get_request() request.response = HTTPResponse() request.response.set_content_type(‘text/html; charset=utf-8’) self.session_manager.start_request()再将quixote目录下的__init__.py里的 DEFAULT_CHARSET = ‘iso-8859-1’ 改成 ‘utf-8’这样应该就肯定没有问题了!我在做的网站也是Quixote.http://beta.u2m.cn有兴趣的话上来转转...
”
他的网站真的很不错的,一个旅游的网站,风格和豆瓣的一样清新,严重推荐! |
|
|