Getting allowed_content_types during class initialization

1 message Options
Embed this post
Permalink
Bill Campbell-2 () Getting allowed_content_types during class initialization
Reply Threaded More More options
Print post
Permalink
How does one get the allowed_content_types for an Archetypes
folderish class during the initial class setup in Plone-3.x?
In Plone-2.5, it was easy enough using something like:

class Class1...
        # stuff here
        allowed_content_types = (...)

class Class2
        # ...
        something = Class1.allowed_content_types

In Plone-3.3.1, this fails with an attribute error, and one must
use the portal_types tool to get the allowed_content_types which
may not be available until all classes are initialized.

The problem I am trying to solve is how to set the allowed types
for a reference field without having to manually specify the
tag settings in argouml where there may be many classes which
are in a composition from a main container.

Bill
--
INTERNET:   [hidden email]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

The typical lawmaker of today is a man devoid of principle -- a mere
counter in a grotesque and knavish game.  If the right pressure could be
applied to him he would be cheerfully in favor of polygamy, astrology or
cannibalism. -- H. L. Mencken

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Archetypes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/archetypes-users