George Wright wrote:
EXCEPT however the ~/Books/src/books/configure.zcml has to be different.
The contents of my original
had to be appended to the bottom of the automatically generated
Yep. The idea is with eggs is that each package should load the
configuration of all its dependencies first before making any registrations.
AND another EXCEPT:
There is no equivalent file path to 'books-configure.zcml':
where one had an entry like this;
Presumably this is now taken care of in the site.zcml which is
automatically generated and includes the same line?
Exactly. Those ZCML "slugs" in etc/package-includes where a horrible
mess and confused most newbies. They were problem maker #1 in all
trainings (people simply forgot them).
site.zcml (still) is the root ZCML file (zope.conf refers to it, in
fact, that's why). It includes all other ZCML files. Typically it only
has to include the application package ("books" in your case) now
because that application is in charge of loading all the dependencies
(which happen to bring up most of Zope).
I fired it up like this:
$ cd ~/Books
$ bin/paster serve deploy.ini
Starting server in PID 198.
2007-10-02T13:15:34 INFO paste.httpserver.ThreadPool Cannot use
kill_thread_limit as ctypes/killthread is not available
serving on http://127.0.0.1:8080
and all goes well from there! I can add and edit reviews as before.
Great to hear that.
I wasn't able to access ++apidoc++
In ~/Books/zope.conf I uncommented the 'devmode on' line
and restarted, logging in as manager. I do get the developer mode
warning, but the 'Introspector' tab didn't appear in ZMI and nor does
the ++apidoc++ address work.
I tried adding the lines:
<include package="zope.app.apidoc" file="meta.zcml" />
to appropriate spots in the site.zcml file
You were on the right track. Unfortunately, that's not enough.
zope.app.apidoc doesn't make sure its dependnecies are loaded. (We're
not completely there yet with the eggification in that regard).
zopeproject 0.4.1 actually enables APIDoc by default. You might want to
look at the apidoc.zcml it generates in the top level sandbox directory.
TO get the new zopeproject version, use
easy_install -U zopeproject
BUT I was plagued with configuration errors like this:
line 207, in getUtility
That's weird. This shouldn't be APIDoc related. This error actually
occurs when you try to go to the "Server Control" screen of ++etc++process.
Zope isn't in charge of the process anymore. bin/paster is. We should
really just get rid of that screen, or at least make it handle this case
I don't get the access logs constantly running in Terminal that I was
How do I start these up?
Ah, thanks for bringing this up. You can use a logging middleware, such
as Paste#translogger. Simply edit 'deploy.ini' and change it to read::
use = egg:Paste#translogger
next = zope
use = egg:HelloWorld
use = egg:Paste#http
host = 127.0.0.1
port = 8080
http://worldcookery.com -- Professional Zope documentation and training
Zope3-users mailing list