Exercises
练习
1. If you don’t like the generated message names, there is a way to change this. The names are generated by an adapter for IWriteContainer implementing zope.app.container.interfaces.INameChooser. Write you own adapter for IMessage and IMessageBoard
1. 如果你不喜欢通用消息名,那么有种方法可以改变它。通过 IWriteContainer 实现 zope.app.container.interfaces.INameChooser 来产生名字。编写你自己的消息和消息栏适配器。
2. Currently the actions on the bottom of the page are implemented using simple links and the user does not know whether s/he will be able to access the view or not. Implement the actions in a way that they depend on the user’s permissions. Note: Menus are extremely helpful for this, so I suggest using them.
2. 在页面底部当前的动作是使用简单的链接,用户并不知道他/她是否可以访问视图。实现一种可以根据用户的权限来变化的动作。注意:菜单是非常有用的。所以我建议使用它们。
3. The message board’s “Posts” screen currently shows all published messages, no matter what. If you have a couple hundred messages, it can take quiet a while to load the screen. Therefore you should implement some batching that only shows at most 20 messages at a time.
3. 消息栏的 “Posts” 屏幕显示所有的发布消息,没关系。如果你有几百个消息,它就需要有相当一段时间来引导该屏幕了。因此你应该实现分批显示,每次至多 20 个消息。
4. There exists currently no way to add attachments to posts. Add a screen that allows you to add attachments to a message. You might also want to customize the “Create a new Post” and “Reply to Post” add forms to be able to add attachments.
4. 当前还不存在发帖时添加附件的方式。增加一个屏幕以允许你给消息添加附件。你也许想自定义“Create a new Post” 和 “Reply to Post” 添加表单以便能添加附件。
5. The “Review Messages” for publication screen has really no option of declining messages. Therefore add some functionality that allows the refusal of messages. Once a message is refused, it should be either deleted or set to private state.
5. 发布屏幕的 “Review Messages” 实际上没有取消信息的选项。因此添加允许取消消息的功能。一旦一个消息被取消,它应该要么被删除或被设为私有状态。
6. There is currently no way for users to mail-subscribe to messages. Implement this screen.
6. 目前用户没办法邮件订阅消息。实现该屏幕。
7. Utilize the Online Help and the existing screens to build a very user-friendly help for the message board.
7. 运行在线帮助和现有屏幕为消息栏构造一个非常用户友好的帮助。
Zope3Book Part IV 草译帖
- firehare
- 帖子: 2625
- 注册时间: 2005-04-10 16:54
- 来自: 温州大学
- 联系: