让Moin1.9跑在Python2.7下

Posted on Wed 03 August 2011 in 我用(IT) • Tagged with Mac OS Lion, moinmoin

晨仔送来了OS X Lion,毫不费力的就升成功了,得赞一个。 结果Python被升级到2.7了,Moin起不来了,解决过程如下

我使用的版本

Moin: 1.9.3 Python: 2.7.1

打patch:Moin patch for Python2.7

解决服务起不来的问题:http://hg.moinmo.in/moin/1.9/rev/a4a7f275b7b3

MoinMoin/support/werkzeug/templates.py 注释掉这一行:from compiler.consts import SC_LOCAL, SC_GLOBAL, SC_FREE, SC_CELL

清cache ...


Continue reading

链接内容保存成文件的命名规范和IE保存moinmoin附件中文文件名乱码的解决

Posted on Tue 25 May 2010 in 我用(IT) • Tagged with Content-Disposition, moinmoin

昨天群峰找我商量解决一个问题,问题的现象是这样的:有一个提供软件包下载的服务,用浏览器下载软件包,另存为的文件名是正确的;但用手机客户端下载,存成的文件名就是下载链接的一长串地址信息且内容为空;用wget模拟更古怪,在一台机器上能存成正确的,另外一台就是地址信息。我又帮他测试了一下,用E52 可以正确下载并保存文件名,wget在xp和ubuntu下头保存的都是链接地址。

可惜当年做这个系统和测试这个功能的人都已经不在了,据说当时竟然测试通过了,难道也是用E52测试的?

群峰用wget -d把Http头信息打出来,内容如下:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Connection: Keep-Alive
Content-Disposition: attachment; filename="NetQin_P0_AV_S60OS70v2_4_28.SIS"
Accept-Ranges: bytes
Content-Type: application/vnd.symbian.install
Content-Length: 476517
Date: Tue, 25 May 2010 ...


Continue reading

MoinMoin-Restrict Upload File"s Length

Posted on Thu 11 March 2010 in 我用(IT) • Tagged with EA, moinmoin, 敏感词

1. 解决方法

# AttachFile.py line 572
# restrict upload file length
#add by LiYan @2010/03/11
limit = 1024*1024*300
file_size = bytes
if file_size>=limit:
# get attached file name
attach_dir = getAttachDir(request, pagename)
fpath = os.path.join(attach_dir, target).encode(config.charset)
os.remove(fpath)
return _(u"reach file ...

Continue reading

Moin限制上传文件大小

Posted on Thu 11 March 2010 in 我用(IT) • Tagged with EA, moinmoin

1. 解决方法

# AttachFile.py line 572
# restrict upload file length
#add by LiYan @2010/03/11
limit = 1024*1024*300
file_size = bytes
if file_size>=limit:
# get attached file name
attach_dir = getAttachDir(request, pagename)
fpath = os.path.join(attach_dir, target).encode(config.charset)

os.remove(fpath)

return _(u"reach file ...

Continue reading

Moin升级和信息系统选型

Posted on Wed 23 September 2009 in it • Tagged with EA, JIRA, moinmoin

昨天晚上10点接到华仔的电话,说moin从1.6升级到1.8.5不是很顺利。一共有两个槛儿:
1. 之前系统部升级失败,但已经更新了数据文件,从而无法自动更新用户密码了(原来的SHA加密升级成SSHA了)
2. 决定上LDAP认证,但redhat上装python-ldap遇到了无法解决的依赖关系。
两个问题,第一个属于既成事实,只有硬走第二条路了。

今天早上我们俩前后脚到单位,华仔很兴奋的告诉我,1.8.5升级成功了,昨天干到11点多,终于辗转腾挪把依赖关系给解决了。赞一个。
1.6往上升级,还有一个槛儿,就是用户组的正则表达变了,引起的问题是acl权限认证失效,应该改成下面这样:
page_group_regex = ur"(?P(?PS+)Group)"

升级的初衷是希望解决pptx后缀的附件下载被认作zip格式,但这个问题在1.8.5还依然存在,还是得继续看看。

moin1.8支持rss发布了,这个功能很有用。


公司的产品和运营都用Jira做信息系统了,研发是继续使用自己开发的系统还是切换到Jira,现在成了一个问题。

其实也没那么难决策,从以下几个方面比较一下就一目了然了:

1 ...


Continue reading

Moin的LDAP认证(ActiveDirectory)

Posted on Fri 28 August 2009 in 我用(IT) • Tagged with ActiveDirectory, EA, LDAP, moinmoin

- Reference
http://moinmo.in/HelpOnAuthentication

- Outline
1. 工作过程:
• 用户在登录界面输入用户名和密码,点击登录按钮
• On login, ldap_login.LDAPAuth checks username/password against LDAP.
  ◦ If username/password is ok for LDAP, it creates or updates a user profile with values from ldap (name, alias, email) and creates a user object in the MoinMoin process, then ...


Continue reading

搭建公司WIKI服务

Posted on Wed 02 January 2008 in 我用(IT) • Tagged with EA, moinmoin, WIKI, 知识管理

选型
http://moinmo.in/

获取软件包
- moinmoin 1.6.0
wget http://static.moinmo.in/files/moin-1.6.0.tar.gz
tar -xzf moin-1.6.0.tar.gz

- Python-2.5.1
wget http://www.python.org/ftp/python/2.5.1/Python-2.5.1.tgz
tar -zxvf Python-2.5.1.tgz ...


Continue reading