George Wright wrote:
EXCEPT however the ~/Books/src/books/configure.zcml has to be different.
The contents of my original
~/zope3demo/lib/python/books/configure.zcml
had to be appended to the bottom of the automatically generated
~/Books/src/books/configure.zcml
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':
~/zope3demo/etc/package-includes/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.
ONE PROBLEM:
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:
xmlns:apidoc="http://namespaces.zope.org/apidoc";
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:
File
"/Users/georgewright/buildout-eggs/tmpWlIac6/zope.component-3.4.0a1-py2.4.egg/zope/component/_api.py",
line 207, in getUtility
ComponentLookupError: (zope.app.applicationcontrol.interfaces.IServerControl>, '')
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
gracefully.
__
ANOTHER PROBLEM:
I don't get the access logs constantly running in Terminal that I was
used to.
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::
[filter-app:main]
use = egg:Paste#translogger
next = zope
[app:zope]
use = egg:HelloWorld
[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 8080
--
http://worldcookery.com -- Professional Zope documentation and training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users