Wednesday, April 4, 2007

Zope 3 applications from eggs and buildout

Here I will introduce two Zope 3 applications created solely
from eggs using Buildout.

First application will display 'Hello' when you access
http://localhost:8080/hello . You can checkout this from here:
svn://svn.zope.org/repos/main/Sandbox/baijum/z3hello/trunk .

Here is the steps to run the application:

  $ svn co svn://svn.zope.org/repos/main/Sandbox/baijum/z3hello/trunk z3hello
  $ cd z3hello
  $ python2.4 bootstrap.py
  $ ./bin/buildout -N
  $ ./bin/instance start

Now, from your browser go to : http://localhost:8080/hello

Running bootstrap.py will install setuptools and zc.buildout and it
will create a directory for building your the application. You can
run `bin/buildout` script created by bootstrap.py to build the
application. Then you are ready to start server using `bin/instance`
script created by buildout command.

You can try the ZWiki (Zope 3 version) similarly:

  $ svn co svn://svn.zope.org/repos/main/zwiki/branches/baijum-experimental-zwiki zwiki
  $ cd zwiki
  $ python2.4 bootstrap.py
  $ ./bin/buildout -N
  $ ./bin/instance start

To see Wikis in action, go into the management interface and add a
Wiki object named `mywiki`. Leave the two preselected options.

To access ZMI: http://localhost:8080/manage (username: admin,
password: admin)  Then visit: http://localhost:8080/++skin++wiki/mywiki

I know there are many "Why" questions. I suggest you to read about
Setuptools and Buildout for the answers. And if you know the
questions with answers, I welcome you to add it here as comments! :)