which base class for "news"
Hi, i need to have a ZClass for News-Entries, but I don't really know which Base Class to use. I need to save author, time of creation and the real news-text with it, so I first thought that I could put these into different properties and have no base class. Now this doesn't work, as I don't have properties with no base class, second thought was to use file, but then I'll get the content page when clicking on it in the ZMI? I know that I can redefine the edit View to my propertysheet/manage view, but I thought that there would be a more "straightforward" solution to this? I also thought about setting the data of a File-subclassed ZClass to the news-text, but this doesn't work, I get a Unauthorized Error when execution <newObject>.update_data within a Script(Python)?! Andreas -- You will pass away very quickly.
Andreas Pakulat wrote at 2003-5-15 17:37 +0200:
Hi,
i need to have a ZClass for News-Entries, but I don't really know which Base Class to use. I need to save author, time of creation and the real news-text with it, so I first thought that I could put these into different properties and have no base class.
That should be sufficient (indeed). Of course, you should have "Include standard Zope persistent object base classes" checked. Beside that, you need no base classes. Instead, you would create a "PropertySheet" and put your attributes in this sheet. You should look in the Zope Book for guidance how to work with property sheets. Come back, when you should not find something. Dieter
On 15.Mai 2003 - 21:16:55, Dieter Maurer wrote:
Andreas Pakulat wrote at 2003-5-15 17:37 +0200:
Hi,
i need to have a ZClass for News-Entries, but I don't really know which Base Class to use. I need to save author, time of creation and the real news-text with it, so I first thought that I could put these into different properties and have no base class.
That should be sufficient (indeed). Of course, you should have "Include standard Zope persistent object base classes" checked. Beside that, you need no base classes.
That I did, but had no "Properties" Tab in the manage_workspace View of a Instance of this ZClass and that did confuse me.
Instead, you would create a "PropertySheet" and put your attributes in this sheet.
Yeah I know...
You should look in the Zope Book for guidance how to work with property sheets. Come back, when you should not find something.
I have, but what was not mentioned anywhere is that I don't get the Properties tab without an extra base class, so I have to create a properties view by myself. Now I see the properties in the manage - View. Anyway this was only a small problem as the ZClass Instances shall be edited/created via a separte Web-Frontend. Thanks anyway. Andreas -- You will outgrow your usefulness.
Andreas Pakulat wrote at 2003-5-15 22:35 +0200:
On 15.Mai 2003 - 21:16:55, Dieter Maurer wrote:
Andreas Pakulat wrote at 2003-5-15 17:37 +0200:
i need to have a ZClass for News-Entries, but I don't really know which Base Class to use. I need to save author, time of creation and the real news-text with it, so I first thought that I could put these into different properties and have no base class.
That should be sufficient (indeed). Of course, you should have "Include standard Zope persistent object base classes" checked. Beside that, you need no base classes.
That I did, but had no "Properties" Tab in the manage_workspace View of a Instance of this ZClass and that did confuse me.
You must define a "View" in your ZClass. The "View"s will become the tabs for the ZInstances. Dieter
participants (2)
-
Andreas Pakulat -
Dieter Maurer