Mike Pelletier wrote:
Jim was (after taunting me for no reason I can tell) very helpful in pointing out that Folderish classes can have their own meta-types tupple, just like in the __init__.py file, which makes those meta-types unique to that kind of Folderish class. I > haven't tried it yet, but I thought someone else might like to know. Can you post Jim's, errr Paul's <wink> original mail to list in the case it contains more information than your posting, since I'm quite interested in this topic?
Stefan
Stefan Franke wrote:
Can you post Jim's, errr Paul's <wink> original mail to list in the case it contains more information than your posting, since I'm quite interested in this topic?
Sorry, I hadn't tried it -- I'm not even smart enough to know what it does -- so I sent it to him in private. To refresh: the question is, "How do I add things to the add list but *only* to be added for some kinds of things?" I asked Jeffrey how Z Tables does it. Here's a code snippet of the Hierarchy class definition. A Hierarchy is Folderish and can contain some unique things like a Report and a Search Form: class Hierarchy(DPBase, Folder): """Model n-level hierarchy """ meta_type='Hierarchy' icon='misc_/Tabula/HierIcon' meta_types=( {'name':'Report', 'action':'manage_add_ReportForm'}, {'name':'Search Form', 'action':'manage_add_SearchForm'}, ) If anybody gets this working, please post a summary. --Paul
participants (2)
-
Paul Everitt -
Stefan Franke