Hi guys,
I'm trying to make a simple guestbook using ZClasses and ZPatterns, I
suppose this is somewhat overkill, and would be alot easier to do using
SQL, but it's for the sake of knowledge (as is everything I do). So I
read the IRC-log and <msegarra> asked a question regarding storing a
ZClass in a  Specialist/Rack, and I suppose that is what I should do
too. Also note that I have not done anything with ZClasses or ZPatterns
and take this as an oppotunity to learn booth ;). So I have done the

I created a product and put 2 ZClasses in it, Guestbook and
Guestbook_entry. Guestbook_entry was created with Dataskin as baseclass
and holds a propertysheet called entry_data.

Guestbook has 2 methods that handles the adding of entries, one is
the form, the other is the actual dataadder (the forms action) and it's
called entry_addProcessor.

I then added a specialist to Guestbook, and told it to store
Guestbook_entrys, it's called entry_storage.

entry_addProcessor contains the following code:

<dtml-let newobj="entry_storage.newItem(_.str(_.int(ts)))">
    Code is supposed to go here... I just have to figure out how to add
    the data sent to newobj...

But when I try to run this I get "Unauthorized" for newItem, and I don't
know what settings to set for anonymous to be able to use it, since I
can't seem to get it to work even with my user that has created

Now, am I correct to put the properties in the ZClass, or should they go
into a PersistentSheet or a PersitentSheetProvider plugin? And if I
should put it into PersistenSheets should I change anything in the
Sheet_Names and Sheet_Namespaces boxes or just att my properties?

And what about the Unauthorized error, should I change something in the
define permissions tab?

Now, if I could get this little question answered in english (not
ZPatternish), I would be very happy, and if you get me to grasp these
things I think quite a few others will grasp it too, and you will get
less requests for basic dokumentation, and everyone will be happy and
live long and prosper forever after.

/Peter Toneby, who really should go to bed now.
Alpha Test Version:  Too buggy to be released to the paying public. 
Beta Test Version:  Still too buggy to be released. 
Release Version:  Alternate pronunciation of "Beta Test Version". 

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to