plone

Using git for a project with many, many repos

谁说胖子不能爱 提交于 2019-11-30 06:40:56
The Plone project consists of 192 different repos: https://github.com/plone/ During development, sometimes 2 or 4 or 10 different repos will need to be touched to fix a bug or implement a feature. It would be great if all these could be branched together and merged together (e.g. a pull request closing issueX containing commits to repo1 , repo2 and repo3 ). Releases require the entire set of repos to be branched and tagged together. Pre-git, a release was defined by a file listing the svn revision numbers of all the modules that make up the release. Does git give us a more streamlined way to

Disable TinyMCE absolute to relative URL Conversions

ぐ巨炮叔叔 提交于 2019-11-30 05:43:02
Can anyone tell me how to get TinyMCE to stop converting my URLs to relative links in Plone? For example, if I enter this in the HTML source: <img src="/images/dir/subdir/my_image.png" /> it will convert it to: <img src="../../../my_image.png" /> I've edited tiny_mce.js (in portal_skins) to set: convert_urls:false, relative_urls:false, but to no effect. I've read all similar posts here, but none really answer this question. It's fine if it does the relative thing when users are picking images by browsing the filesystem (i.e. the catalog). I just want it to respect what I type in the html box .

Backing up (and restoring) a Plone instance

寵の児 提交于 2019-11-29 16:27:45
I have a Plone installation in my home directory under Linux. ~/Plone . This was made from a default distribution of Plone from its website. So Plone compiled own python and is bundeled with Zope. Please tell me, which files are necessary to backup if I want to: 1) Backup the whole data ever stored in my Plone instance; 2a) Restore the backed-up data in a same version of Plone, but located elsewhere. 2b) Restore the backed-up data in a (slightly) newer version of Plone. I thought, maybe it's a good idea to just backup the whole ~/Plone/zinstance directory, but I found thousands of occurrences

Plone 4.3 default editor isn't showing up

廉价感情. 提交于 2019-11-29 16:07:41
I have a Plone 4.3 site that was a migration from a Plone 2.5 site. It had been working fine, but for some reason the default editor that shows up when editing any page or content item is the straight HTML view. I've tested it in Firefox, Chrome, and Safari — all shows up the same. The drop down menu above the editing box shows these options: I've also tried switching the "Default editor" both in the Site setup > Editing Control Panel and also through the ZMI > portal_properties > site_properties > available_editors but no dice. The options there are None, Kupu, and TinyMCE. There are two

How to set the sharing rights of a folder in Plone?

落花浮王杯 提交于 2019-11-29 15:48:18
I want to set sharing rights of many folders by using a Python script in a Plone site. You need to look at the AccessControl/rolemanager.py module for details; the sharing tab in Plone is a friendly wrapper around that API. To add roles for a given userid, call manage_addLocalRoles : context.manage_addLocalRoles('userid', ('Role1', 'Role2',)) The other two important methods are manage_setLocalRoles(userid, roles) (replace the current set of roles completely) and manage_delLocalRoles(userid) (delete all roles). get_local_roles_for_userid(userid) could be handy too, to see what local roles are

How do you get and set cookies in Zope and Plone?

不问归期 提交于 2019-11-29 12:17:01
问题 Documentation, and more importantly, some code examples would be very useful. I would prefer this to not be in protected scripts, but in the code that goes into modern packages. 回答1: Use the response.setCookie() method. You can reach the response object via the request object. The latter you can reach via acquisition ( self.REQUEST ), or in views by accessing the passed-in request object, usually via self.request : self.request.response.setCookie(name, value, **options) where options end up

how to get derived class name from base class

梦想与她 提交于 2019-11-29 10:41:04
问题 I have a base class Person and derived classes Manager and Employee . Now, what I would like to know is the object created is Manager or the Employee . The person is given as belows: from Project.CMFCore.utils import getToolByName schema = getattr(Person, 'schema', Schema(())).copy() + Schema((TextField('FirstName', required = True, widget = StringWidget(label='First Name', i18n_domain='project')), TextField('Last Name', required = True, widget = StringWidget(label='Last Name', i18n_domain=

Purging all old CMFEditions versions

≡放荡痞女 提交于 2019-11-29 09:12:49
问题 We have big huge site which database should be prepared for development copies. How one can remove all old history versions of all content items? This way we could greatly reduce the size of data needed to transfer to developer computers. Plone 4.0 回答1: Go to portal_purgepolicy and set the number to some number (I usually use '3' to keep at least some history). Run the following script: from DateTime import DateTime from Products.CMFCore.utils import getToolByName from Products.CMFEditions

Integrate facebook users on Plone

☆樱花仙子☆ 提交于 2019-11-29 07:52:08
I'm creating a Plone site which will allow users to register with Facebook but I need more than just like boxes and feed forms. I already have collective.simplesocial[1]. Logged users are expected to have some more data than the Plone default (i.e. height, weight, average workout...) and the data that one can get from Facebook. So the question is: how can I register users that some data comes from Facebook? Facebook connect is quite handy since whenever the user is logged on Facebook, it will also be logged on my site. Maybe a Plone PAS plugin? Or just prefilling the register form (though then

VARCHAR requires a length when rendered on MySQL

会有一股神秘感。 提交于 2019-11-28 05:10:47
问题 I have a buildout instance with pas.plugins.sqlalchemy. It appears in installation list but when installing it results in an error. Here's the ZCML definition: <configure xmlns="http://namespaces.zope.org/zope" xmlns:db="http://namespaces.zope.org/db"> <include package="z3c.saconfig" file="meta.zcml" /> <db:engine xmlns="http://namespaces.zope.org/db" name="pas" url="mysql://webadmin:password@rcs-mysql-dev/estep" /> <db:session xmlns="http://namespaces.zope.org/db" name="pas.plugins