dexterity

Title and description aren't indexed with collective.dexteritytextindexer

断了今生、忘了曾经 提交于 2019-12-05 20:50:27
I have lots of Dexterity content types, some of them are just containers and are left with just the Title and Description (from plone.app.dexterity.behaviors.metadata.IBasic behavior). I can find them by searching the text inside their title or description. But for some complex content types I'm using collective.dexteritytextindexer to index some more fields and it works fine, I can find the text on the fields I marked to be indexed. However the Title and Description are no longer available for searching. I tried something like: class IMyContent(form.Schema): """My content type description """

Restrict upload by filetype or mimetype using Dexterity on Plone

痴心易碎 提交于 2019-12-05 15:52:07
I have a custom content type, built with dexterity. In the schema (The schema is listed below), I use ' plone.namedfile.field.NamedFile ' for attachements/uploads. I would like to restrict uploads so that only mp3 files can be attached to my content type. What is the best approach for achieving this? Here is the full schema/model for my content type: <model xmlns="http://namespaces.plone.org/supermodel/schema"> <schema> <field name="date" type="zope.schema.Date"> <description /> <title>Date</title> </field> <field name="speaker" type="zope.schema.TextLine"> <description /> <title>Speaker<

Preventing users to upload BMP, TIFF etc. images to ImageField in Plone

十年热恋 提交于 2019-12-05 11:48:40
The users do it because they can. However, image auto-resize etc. breaks down. This make me a sad boy. How to limit image uploads to GIF, PNG and JPEG sitewide? For Archetypes For Dexterity i ran into similar problems these days and worked around them like that: add a custom widget that adds an accept attribute to the file input set field.swallowResizeExceptions = True so users at least don't get a site-error when uploading an unsopported image type state mimetypes that work in description The field definition looks like this: atapi.ImageField('image1', swallowResizeExceptions = True, widget =

How can I add a Dexterity content type as the default view?

半世苍凉 提交于 2019-12-04 16:09:22
I'm trying to set a folder default view as a Dexterity content type that I created. But I see that Dexterity content types aren't in the list of possible default content views for folders. Why? Is there an option that I must set in the content type? Content items are listed as candidate default pages if: the object is not a container type or the object portal type is listed in the default_page_types of your site_properties property sheet. Find that in the ZMI (site settings -> Zope Management Interface -> portal_properties ). The default_page_types property is a list of portal_type ids; for

The Holy Grail of Plone workflow

人盡茶涼 提交于 2019-12-03 12:53:07
问题 We are in the process of implementing a Plone CMS as a repository for ISO9001-documents. ISO demands a certain amount of logging, as anyone familiar with the standard probably knows :-) For the sake of flexibility we would like to incorporate, in no specific order: New contenttypes : necessary to incorporate the different documents that can arise in an enterprise Versioning: to show that our documents are always up to date, and to show which changes were made vs a previous version of the same

The Holy Grail of Plone workflow

删除回忆录丶 提交于 2019-12-03 03:15:11
We are in the process of implementing a Plone CMS as a repository for ISO9001-documents. ISO demands a certain amount of logging, as anyone familiar with the standard probably knows :-) For the sake of flexibility we would like to incorporate, in no specific order: New contenttypes : necessary to incorporate the different documents that can arise in an enterprise Versioning: to show that our documents are always up to date, and to show which changes were made vs a previous version of the same document Working copy support: so that a "published" document stays online while it is being edited

How to clean up old interfaces on zc.relation catalog?

瘦欲@ 提交于 2019-12-02 03:36:12
问题 I was using plone.directives.form version 1.0 with Plone 4.2.5 and after upgrading to 4.2.6 I started seeing the following traceback and I guess its due to plone.directives.form being upgraded to version 1.1. How can I avoid this error? The only line of code that is not from default Plone on the traceback is on der.freitag.handlers where it does a transaction.commit() and the content type is just a regular dexterity content type. 1385740390.020.496977141203 http://10.100.0.207:8081/website

How to clean up old interfaces on zc.relation catalog?

徘徊边缘 提交于 2019-12-02 00:22:50
I was using plone.directives.form version 1.0 with Plone 4.2.5 and after upgrading to 4.2.6 I started seeing the following traceback and I guess its due to plone.directives.form being upgraded to version 1.1. How can I avoid this error? The only line of code that is not from default Plone on the traceback is on der.freitag.handlers where it does a transaction.commit() and the content type is just a regular dexterity content type. 1385740390.020.496977141203 http://10.100.0.207:8081/website/front-page/atomkraft/++add++der.freitag.customizablearticlelink Traceback (innermost last): Module

Render rich text widget manually in plone custom page

試著忘記壹切 提交于 2019-12-01 12:34:57
I have a custom edit (browser page) for my dexterity content type. In template I have defined a form using Bootstrap and added some Angular JS code for form behavior. It is working. :) I need to replace a simple textarea with rich text widget. So how can I render in my template the rich text widget (one that is normally used in dexterity)? keul If you are using Mockup (not sure if anybody use it on Plone 4) you can find tips there: Obtaining the "default" mockup TinyMCE configuration on Plone 5 Otherwise (the Plone 4.3 version of TinyMCE) it's only a matter of CSS classes and configurations.

Moving fields between fieldsets on Dexterity

耗尽温柔 提交于 2019-12-01 06:59:29
In Archetypes, in order to move a field from a fieldset (or schemata) to another, we can do the following: schema['creators'].schemata = 'default' However, I'm not achieving the same using Dexterity. I've tried using form hints. Ex: form.fieldset('default', fields=['creators'] ) I notice that it doesn't work because the field "creators" is unknown at this time. (The ownership behavior wasn't evaluated yet). Nevertheless, with form hints, I can move from "default" to another (eg. "ownership"). myfile = NamedFile(title=_(u"A file")) form.fieldset('ownership', fields=['myfile']) How can I do that