个人工具
119.28.94.63
该IP地址的讨论
登录
查看“UbuntuHelp:LearningZope3”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:LearningZope3”的源代码
来自Ubuntu中文
←
UbuntuHelp:LearningZope3
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/LearningZope3}} {{Languages|UbuntuHelp:LearningZope3}} == Motivation == Creating zope3 applications is no easy task. This document comes out of a desire to help build a zope3 user community in support of [[UbuntuHelp:SchoolTool|SchoolTool]] and the [[UbuntuHelp:CanDo|CanDo]] competency tracking application which is being built on top of [[UbuntuHelp:SchoolTool|SchoolTool]]. The goal here is to keep things as simple as possible. Zope3 is extremely complex, and the learning curve is steep to say the least. I'm assuming that the aspiring zope3 developer here will be using Ubuntu Dapper (or Edgy), and running their zope instance from their home directly on the port specified in their '''zope.conf''' file. == Installation == For the following commands, you will need sudo privileges: <ol><li>make sure you have the following packages installed (<code><nowiki>sudo apt-get install subversion make gcc python-dev libc6-dev</nowiki></code>):</li></ol> * subversion * make * gcc * python-dev * libc6-dev <ol><li><code><nowiki>cd /usr/local/src</nowiki></code> </li><li><code><nowiki>sudo svn co svn://svn.zope.org/repos/main/Zope3/trunk Zope3</nowiki></code> </li><li><code><nowiki>cd Zope3</nowiki></code> </li><li><code><nowiki>sudo make</nowiki></code> </li><li><code><nowiki>sudo python test.py -v</nowiki></code> (to run all the tests. note use <code><nowiki>sudo python test.py -vpf1</nowiki></code> if a test fails and you want to know which one.) </li><li><code><nowiki>sudo ln -s /usr/local/src/Zope3/bin/mkzopeinstance /usr/local/bin/mkzopeinstance</nowiki></code></li></ol> Developers don't need sudo privileges for the following: <ol><li><code><nowiki>cd ~</nowiki></code> (to get to your home directory) </li><li><code><nowiki>mkzopeinstance</nowiki></code> </li><li>For <code><nowiki>Directory:</nowiki></code> we will be using <code><nowiki>zope3</nowiki></code> in the user's home directory (<code><nowiki>/home/<username>/zope3</nowiki></code>). </li><li>Choose a username for the initial administrator account (for example <code><nowiki>zopeuser</nowiki></code>). </li><li>Select a password manager from among: Plain Text, MD5, and SHA1. (Text is least secure, SHA1 is most secure). </li><li>Enter your password twice.</li></ol> You should now have a <code><nowiki>zope3</nowiki></code> directory inside your home directory containing an instance of zope3. == Starting zope == As the developer from your home directory, there are two easy ways to start your zope3 instance: <ol><li><code><nowiki>./zope3/bin/runzope</nowiki></code> </li><li><code><nowiki>./zope3/bin/zopectl start</nowiki></code></li></ol> For testing new code use <code><nowiki>runzope</nowiki></code>. Messages and debugging information will applear in the console, and you will be able to see when zope fails to start. Keep in mind that when using <code><nowiki>runzope</nowiki></code> the application server will stop when you close the terminal from which it is run or interrupt it by typing <code><nowiki>Ctrl-C</nowiki></code>, so to keep the server running use <code><nowiki>zopectl start</nowiki></code>. When running with <code><nowiki>zopectl start</nowiki></code>, you can stop it with <code><nowiki>zopectl stop</nowiki></code> and check the status with <code><nowiki>zopectl status</nowiki></code>. If there will be other zope instances running on your machine, the default port, 8080, may already be in use. To change the port on which your instance runs, do the following: <ol><li>edit <code><nowiki>./zope3/etc/zope.conf</nowiki></code> </li><li>change the section:<pre><nowiki> <server> type HTTP address 8080 </server></nowiki></pre> to use the desired port.</li></ol> Users should now be able to run your zope instance. To administer your instance, login with the username you chose earlier (e.g. <code><nowiki>zopeuser</nowiki></code>). == Setting PYTHONPATH == In order to be able to import and run your zope code from the command line, add the following to the bottom of your <code><nowiki>.bashrc</nowiki></code> file: <pre><nowiki> PYTHONPATH=/usr/local/src/Zope3/src:$HOME/zope3/lib/python export PYTHONPATH</nowiki></pre> == External Documentation == <ol><li>http://www.treefernwebservices.co.nz/hello.html </li><li>http://zissue.berlios.de/z3/hello.swf </li><li>http://www.benjiyork.com/quick_start/ </li><li>http://zissue.berlios.de/z3/Zope3In30Minutes.html </li><li>http://worldcookery.com/files/jeffshell-todo </li><li>http://python.taupro.com/Zope3Notes/HowToContentComponent </li><li>http://www.ibiblio.org/obp/pyBiblio/zope3</li></ol> ---- [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:LearningZope3
。