|
|
7 User(s) Active on Site 233 Wiki Pages Most Recently Modified
Club Resources (edit)
How This Wiki Works
Check them out; they are a great source of technical books at very good prices! If you have shopped at Nerdbooks.com, help them out by reviewing them at ResellerRatings.com. You will need your invoice number to prove you are a real customer, and not just ballot stuffing. |
|||
| Recent Changes Printable View Page History Edit Page | |||
|
Content Last Modified on October 31, 2005, at 12:05 AM CST
Zope 3 MessageBoard?: Tutorial for the Tutorial This is a draft, and contains misc notes and questions that need to be cleared up later. It was the result of the Zope3 SIG meeting on 10-30-05 in which Ralph, Brad, and J. followed the Zope 3 Developer's Handbook MessageBoard? tutorial. It was a bit of a struggle because of some outdated aspects, and because we still hadn't grasped all of the concepts involved. In step 1, the need to create a principal.zcml file is mentioned. I was able to get Zope 3 running, but I didn't create a principal.zcml. I'm not sure what that is or does. The book mentions the wrong path to the SVN repository. As it turns out, the SVN repository is essential to the tutorial, because the tutorial text doesn't contain the text of all the requisite files. Here is the correct command to download the svn svn co svn://svn.zope.org/repos/main/book/trunk Per the tutorial's recommendation, we created the 'book' tutorial Python package in the lib/python directory of our Zope instance. For the Ubuntu Zope 3.1 sandbox, that turned out to be: /var/lib/zope3/instance/sandbox/lib/python Interestingly, this directory path is symbolically linked from the "Products" folder in the Zope instance. I guess Python modules and packages must correspond with Zope Products. The permissions on my "book" package needed to be changed to allow me to edit. The ownership of the parent folder was zope:zope, with file mode 755. I gave my book package ownership of zope:zope but file modes 777 to allow myself to add files and edit them. When this is done I plan to correct the permissions on book and its contents. For steps 1 - 5, there isn't much to do except set up the folders and install the files from SVN. My approach was to download the whole SVN repository to my home directory, and copy them into the book/messageboard package as I followed along the tutorial. There is a command to run in step 5, but the output doesn't get used for anything. It's just kind of an FYI about the pyskel tool. Starting with Step 6, there was some actual stuff to do: Step 6 - Running Unit Tests tests in SVN contained deprecated imports from zope.app.test This was easily fixed by replacing with zope.app.testing tests also failed because lack of fields.py file I was able to get this file from SVN but it wasn't mentioned in the tutorial Step 7 - Registering Content Components The tutorial doesn't explicitly say that configure.zcml belongs inside the messageboard module. I can see it is in the SVN download. I went ahead and installed the configure.zcml from the SVN. I noticed there was a security.zcml so I grabbed that one, too. Step 8 - Configuring Some Basic Views No special notes here. Just copied the browser package from SVN into messageboard. Step 9 - Registering the Message Board With Zope These instructions were fine, except for the need to change the permissions on the messageboard-configure.zcml to match those of its siblings. btw, this file had to be created manually. It was not in SVN. Step 10 - Testing the Content Component Ok, I broke my Zope. There's a traceback in log/transcript, but I was able to get more detail on the error by going into Python interactive mode and importing the offending module, as shown below. There are lots of deprecation warnings to slog through, but the real troublesome bit is at the end. ballen@ubu:/var/lib/zope3/instance/sandbox/lib/python$ python Python 2.4.2 (#2, Sep 30 2005, 21:19:01) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import book.messageboard.browser.messageboard book/messageboard/browser/messageboard.py:22: DeprecationWarning?: ActiveStatus?: ActiveStatus? is now available in zope.app.component.interfaces.registration. Will be gone in X3.3. from zope.app.registration.interfaces import ActiveStatus?
book/messageboard/browser/messageboard.py:23: DeprecationWarning?: ISite?: This interface has been moved to zope.app.component.interfaces. The reference will be gone in X3.3. from zope.app.site.interfaces import ISite?
book/messageboard/browser/messageboard.py:24: DeprecationWarning?: SiteManager?: This class has been moved to zope.app.component.site. The reference will be gone in X3.3. from zope.app.site.service import SiteManager?, ServiceRegistration? book/messageboard/browser/messageboard.py:24: DeprecationWarning?: ServiceRegistration?: The concept of services has been removed. Use utilities instead. The reference will be gone in X3.3. from zope.app.site.service import SiteManager?, ServiceRegistration? book/messageboard/browser/messageboard.py:25: DeprecationWarning?: LocalUtilityService?: Services have been removed. Use site manager API. The reference will be gone in X3.3. from zope.app.utility.utility import LocalUtilityService?, UtilityRegistration? book/messageboard/browser/messageboard.py:25: DeprecationWarning?: UtilityRegistration?: This class has been moved to zope.app.component.site. The reference will be gone in X3.3. from zope.app.utility.utility import LocalUtilityService?, UtilityRegistration? Traceback (most recent call last): File "<stdin>", line 1, in ?
File "book/messageboard/browser/messageboard.py", line 26, in ?
from zope.app.workflow.interfaces import IProcessDefinitionImportHandler?
ImportError?: No module named workflow.interfaces >>> |
|||
| Recent Changes Printable View Page History Edit Page | |||