|
Re: BaseFolder type: msg#00112web.zope.plone.archetypes.devel
you have to set the attribute 'allowed_content_types' in your class allowed_content_types = ('Document', 'Image') -hotdi grendelAI wrote: > I created a new type based on BaseFolder. Yet when I go to item view it > does not display an add item drop down or button. I am unable to add any > items. I used the PloneAddressBook as an example, but I cannot determine > what's the difference. Here is my code. > > schema = BaseSchema + Schema(( > StringField('title', > searchable = 1, > required = 1, > widget = StringWidget(label='Title', > description='Title of the Game > Event',), > ), > StringField('host_name', > searchable = 1, > required = 1, > widget = StringWidget(label='Host Name', > description='Name of the person > hosting the event',), > ), > DateTimeField('start_date', > searchable = 1, > required = 1, > default=DateTime(), > widget=CalendarWidget(label="Start Date", > description="The start date-time > of > the event"), > ), > DateTimeField('end_date', > searchable = 1, > required = 1, > default=DateTime(), > widget=CalendarWidget(label="End Date", > description="The end date-time of > the event"), > ), > TextField('body', > searchable=1, > required=1, > allowable_content_types=('text/plain', > 'text/structured', > 'text/html',), > widget=TextAreaWidget(label='Description', > description='The Description of the > event',), > ), > )) > > class SquidEvent(BaseFolder): > """This is the start of the squid event, it has an overridden view for > show, > but this is purely optional > """ > > __implements__ = (IReferenceable,) + BaseFolder.__implements__ > > schema = schema > > filter_content_types = None > > global_allow = 0 > > actions = ({ > 'id': 'view', > 'name': 'View', > 'action': 'squidevent_view', > 'permissions': (CMFCorePermissions.View,) > },) > > > > > registerType(SquidEvent) > > > > Is there some other file I am missing? Thanks for the help. > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Some newbie questions: 00112, Andreas Jung |
|---|---|
| Next by Date: | Re: Some newbie questions: 00112, Christian Scholz |
| Previous by Thread: | BaseFolder typei: 00112, grendelAI |
| Next by Thread: | Re: BaseFolder type: 00112, grendelAI |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |