一个plonehrm扩展模块,用于向员工添加注释。
plonehrm.notes的Python项目详细描述
plone hrm的注释
此扩展模块为员工内容添加了非常简单的注释 扑通声hrm类型。
概述
一个plonehrm扩展模块,用于向员工添加注释。
>>> from plonehrm.notes.notes import Note, Notes
注释是带有简单unicode字符串和日期的持久dict。
>>> n1 = Note(u'My first little note.') >>> n1.text u'My first little note.'>>> from datetime import date >>> n1.date == date.today().isoformat() True
notes是存储注释的持久列表。
<>但是它只把文本作为输入,而不是已经存在的注释:>>> nts = Notes()
>>> nts.addNote(n1) Traceback (most recent call last): AssertionError: string expected, got <class 'plonehrm.notes.notes.Note'>
不过,我们仍然可以添加便条的纯文本。
>>> nts.addNote(n1.text) >>> nts.addNote(u'It could be much longer if you prefer that.') >>> print nts [<plonehrm.notes.notes.Note ...>, <plonehrm.notes.notes.Note ...>]
并始终确保文本属性为unicode。
>>> n3 = Note(u'H\xc3\xa9 daar!') >>> unicode(n3.text) u'H\xc3\xa9 daar!' >>> n3.text u'H\xc3\xa9 daar!'
现在我们要删除一个便条。
>>> nts.addNote(u"Please remove this note.") >>> len(nts) 3 >>> nts.removeNote(u"Please remove this note.") >>> len(nts) 2 >>> nts.removeNote(u"This note does not exist.") Traceback (most recent call last): ... ValueError: list.remove(x): x not in list
plonehrm.notes的历史
1.1(2010-01-15)
- 测试中的一些更改,以便它可以处理新的权限 检查。[文森特]
1.0.7(2010-01-07)
- viewlet现在由“plonehrm:view notes viewlet”保护 许可。“删除”按钮由“plonehrm:manage”保护 “注意”和“添加”按钮仍由“plonehrm:add”保护 注意。[文森特]
1.0.6(2009-07-29)
- 更新了note viewlet的kss操作。现在,信息信息是 在创建或删除便笺时显示。消息是隐藏的 当用户点击“取消”按钮时。[文森特]
1.0.5(2009-06-23)
- 什么都没变。
1.0.4(2009-06-15)
- 什么都没变。
1.0.3(2009-06-03)
- 现在“note”viewlet充当员工中的其他viewlet 查看。标题中有一个“添加”按钮,允许显示 添加新便笺的窗体。添加便条后,表单将消失 列表再次显示。[文森特]
1.0.2(2009-05-26)
- 在Notes Viewlet中添加了指向Notes清单的链接。[谚语]
- 已从区域设置中删除.mo文件。这意味着这些翻译将 在旧的Plone 3.0中看不到。[毛里塔尼亚]
1.0.1(2009-04-16)
- 删除plonehrm:从我们的 角色映射.xml。那些权限很快就会消失,我不确定 他们在普洛尼赫姆做了什么。首先是笔记… [毛里塔尼亚+迈克]
- 使用collective.autopermission注册权限。 [毛里塔尼亚]
- 将行尾样式设置为本机样式并设置svn:ignore。[毛里塔尼亚]
1.0(2008-10-02)
- 没有历史记录。
1.0测试版2(2008年9月2日)
- 没有历史记录。
1.0β1(2007年12月13日)
- 最初的beta版本。