plone

How do you override the default value of a field in a dexterity behavior in Plone?

核能气质少年 提交于 2019-12-22 08:07:33
问题 We have a requirement for a dexterity content type to have exclude from navigation behaviour but for the exclude_from_nav field's default value to be True . In the behaviour plone.app.dexterity.behaviors.exclfromnav.IExcludeFromNavigation it defaults to False . Obviously I could create my own behaviour that copies IExcludeFromNavigation except for the default value but I was wondering if there was a way to do this based on reusing IExcludeFromNavigation . We have other content types that use

Plone Switching to ZRS using plone.recipe.zeoserver on Plone 4.3.1

会有一股神秘感。 提交于 2019-12-22 08:01:39
问题 I'm working on setting up a Zope Replicated Storage (ZRS) based deployment. I currently have two servers (east and west) west will be the primary east will be the secondary I haven't touched the west box yet . On the east box I've edited my buildout as follows (I had to pin plone.recipe.zeoserver to 1.2.6 because the zrs features didn't exist before version 1.2.6): [zeoserver] recipe = plone.recipe.zeoserver[zrs] replicate-from = ${hosts:zeoserver-west}:${ports:zeoserver-zrs} [versions] plone

Problem with plone.indexer and Dexterity

雨燕双飞 提交于 2019-12-22 04:42:08
问题 I wish to enable a special index, called Sectors, for a attribute ('sectors') of my Dexterity based custom content-type. In my schema, inside types/mycontent.py I have: class IMyContent(form.Schema): """ My Content """ sectors = schema.Set( title=_(u"Sectors"), description=_(u"Select some sectors"), value_type=schema.Choice(vocabulary=vocs.sectors), required=True, ) (...) I then define the index in this way, inside indexers.py from plone.indexer.decorator import indexer from zr.content.types

How can I stop people accessing a plone server via webdav?

时间秒杀一切 提交于 2019-12-22 01:17:27
问题 I would like to know how I can disable webdav access to my plone4 server . The server is configured to block all direct http access to the normal zope client ports (8080, and 8081), and it is impossible to access plone externally via the http://ploneservername:8080 address. This is intended as we want all client connections to be encrypted. I have configured it so that all access has to be proxied via an apache2 service running on the same server that listens/terminates SSL on port 443. The

Plone 4: restricting published content

倖福魔咒の 提交于 2019-12-21 16:26:12
问题 On a Plone 4.x install, can either published content be restricted to a certain user/group or private content be made to show in menus and searches for not-logged-in users ? I have a customer who wants to be able to have content that can only be viewed by a certain user/group, but will show up in a menu or search when not logged in. What would be the best approach for achieving this functionality? 回答1: You'll have to customize your workflow as below: go to Zope Management Interface-> portal

Normalizing unicode text to filenames, etc. in Python

余生长醉 提交于 2019-12-20 09:51:54
问题 Are there any standalonenish solutions for normalizing international unicode text to safe ids and filenames in Python? E.g. turn My International Text: åäö to my-international-text-aao plone.i18n does really good job, but unfortunately it depends on zope.security and zope.publisher and some other packages making it fragile dependency. Some operations that plone.i18n applies 回答1: What you want to do is also known as "slugify" a string. Here's a possible solution: import re from unicodedata

plone change in code not visible in development site

北城余情 提交于 2019-12-20 05:45:30
问题 I am very new to plone. I have a project folder in eclipse. I have imported it from the cvs project. I have zope as server and I start zope with ./bin/instance restart . When I make changes in my folder, I cannot see the changes in the development website. I can't seem to find what is happening. I even restarted zope after making changes in python. Can anyone help me with this? 回答1: Make sure you start your Zope server with bin/instance fg , most likely the name of the script if you used the

Plone with Apache Proxy

守給你的承諾、 提交于 2019-12-20 05:29:07
问题 I have a plone zinstance set up through Apache Proxy on OS X Server 10.5. The server is set up with a single vhost on port 80, with Proxy & Proxypass directives to the Plone zinstance: ProxyPass / http://localhost:8080/VirtualHostBase/http/server:80/Plone/VirtualHostRoot/ ProxyPassReverse / http://localhost:8080/VirtualHostBase/http/server:80/Plone/VirtualHostRoot/ However, I have some static HTML and PHP content that I want to display in an iframe via the plone site. I'm thinking I'll need

Plone with Apache Proxy

我们两清 提交于 2019-12-20 05:29:04
问题 I have a plone zinstance set up through Apache Proxy on OS X Server 10.5. The server is set up with a single vhost on port 80, with Proxy & Proxypass directives to the Plone zinstance: ProxyPass / http://localhost:8080/VirtualHostBase/http/server:80/Plone/VirtualHostRoot/ ProxyPassReverse / http://localhost:8080/VirtualHostBase/http/server:80/Plone/VirtualHostRoot/ However, I have some static HTML and PHP content that I want to display in an iframe via the plone site. I'm thinking I'll need

tinyMCE editor bar not showing up

笑着哭i 提交于 2019-12-20 03:38:08
问题 I'm running Plone 4.1.4 and when I try to edit a text area that used to display the tinyMCE editor all I get is a dialog box listing a dict of "valid elements". I installed the kupu editor and that works fine, but I prefer tinyMCE. Has anyone run in to this issue? Any help would be greatly appreciated. 回答1: Browser and version? IE 9 has TinyMCE issues, and requires you to use a development release. To get around it I had to install a version from github. If you have mr.developer, use: