zope

Backing up (and restoring) a Plone instance.

Hello, everyone! 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 instanc...

converting a zcml based python script to a standalone script in zope/plone

I have a python class working in zope 3 zcml kind of way, but i want to move the python into a standalone script that a could access via something along the lines of tal:content='context/get_tags'. This is the code as it stands: class TagListView(BrowserView): def getCategories(self): categories = set() for cat in self.portal_c...

How can I tell if a field has changed value in an AT object in plone?

I have an AT content type in Plone. It has a number of fields, including a file field. When the user edits an object of this type, how can I tell if a new file was uploaded? For that matter, how can I tell if any of the fields have been changed? I am currently using subscribers to hook into the IObjectEditedEvent to do some after the ...

Zope / Plone 3 product uninstsall issue

Hey all, I uninstalled a content type that I'd previously added and afterward I'm still getting a warning of 2010-01-06 22:43:50 WARNING OFS.Uninstalled Could not import class 'myclass ' from module 'ns.archetype_name.content.content_type_name' It isn't resulting in obvious problems, but it concerns me since I thought I'd uninstalled...

Install Plone egg as a Python module on Windows

I have a Plone site (Plone version 3.1.2) that I need to install a product called GrufSpaces on - (http://plone.org/products/grufspaces). However, it is a production site and so I can't easily take it down to upgrade Plone to 3.2+ in order to use buildout; using buildout would allow me to easily add Grufspaces (collective.groupspace.role...

What is the difference between a Zope utility defined with a factory versus a component?

It's a little confusing that ZCML registrations for Zope utilities can accept a component or a factory. <utility component=".some.Class" /> versus <utility factory=".some.Factory" /> What is the difference? ...

Use getControl to control objects other than the name variable

Hello, I am using the Zope testbrowser which has been recommended in my last question. The problem that I am facing is that I can use the getControl function to control different objects like: password, username etc. I am trying to submit the page to get to the next page but the submit button has no 'name' variable, just an 'id' variab...

Using ZPT in Google App Engine

Has anyone tried using ZPT in Google App Engine? If yes, please let me know how. Thanks in advance. EDIT: An example at http://gae-zpt.appspot.com/ by DisplacedAussie http://stackoverflow.com/users/2962/displacedaussie It can be downloaded from http://github.com/displacedaussie/gae-zpt I can now happily run at: http://blogthere.apps...

How to go from uml to app in zope (plone)

I have watched this keynote that talk about develop an app based on an UML model, but I can't find any tutorial or docs about it. Do you know any tutorial or documentation to help me? thanks ...

Comparing list item values to other items in other list in Python

I want to compare the values in one list to the values in a second list and return all those that are in the first list but not in the second i.e. list1 = ['one','two','three','four','five'] list2 = ['one','two','four'] would return 'three' and 'five'. I have only a little experience with python, so this may turn out to be a ridiculo...

Disable Plone Archetypes index/convert doc/pdf files

Hi Stackoverflowers, if i rebuild my catalog in plone i get many of this infos: 2010-02-18T11:26:09 INFO Archetypes Error while trying to convert file contents to 'text/plain' in .getIndexable() of : Unable to find binary "wvHtml" in /sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre...

Per object permissions in a container

In my Grok application I have a container of objects and I'd like to limit the objects that a particular principal can view based on an attribute of the principal and the object. If the principal is an administrator they're able to view any of the objects. I've got this to work by using a Traverser that raises an Unauthorized exception ...

Migrating data from Plone to Liferay, or how could I retrieve information from Plone's Data.fs

Hello, all. I need to migrate data from a Plone-based portal to Liferay. Has anyone some idea on how to do it? Anyway, I am trying to retrieve data from Data.fs and store it in a representation easier to work, such as JSON. To do it, I need to know which objects I should get from Plone's Data.fs. I already got the Products.CMFPlone.Por...

Is there a way to open a Zope DB in .Net?

Hi, I need to upgrade an old system based on Zope, I need to be able to export the data to something like SQL Server...does anyone know of a way I can open the Zope DB in .NET or directly export it to SQL Server? Thanks, Kieron ...

web2py or grok (zope) on a big portal,

Hi, I am planning to make some big project (1 000 000 users, approximately 500 request pre second - in hot time). For performance I'm going to use no relational dbms (each request could cost lot of instructions in relational dbms like mysql) - so i can't use DAL. My question is: how web2py is working with a big traffic, is it work c...

Call macro from Python script?

One of our page templates is made up of a bunch of macros. These items are a bunch of html tables. Now, I want a couple of these tables in a Python script to create a PDF. Is there a way call a macro from a Python script and get back the HTML that is produced? If so, can you explain? Thanks Eric ...

Purpose of Zope Interfaces?

I have started using Zope interfaces in my code, and as of now, they are really only documentation. I use them to specify what attributes the class should possess, explicitly implement them in the appropriate classes and explicitly check for them where I expect one. This is fine, but I would like them to do more if possible, such as actu...

limit concurrent user logins in Plone/Zope

Hi, I want to limit the number of active sessions a user can have in Plone/Zope. We are selling access to digital content and ideally want to limit how many concurrent logins can use one set of credentials. What would be the best way to achieve this? Thanks, Peter ...

What is the best way to convert a zope DateTime object into Python datetime object?

I need to convert a zope 2 DateTime object into a Python datetime object. What is the best way to do that? Thanks, Erika ...

Using Zope object unique id ( _p_oid ) to access object itself

Every Zope object has it's own unique id ( _p_oid ). To convert it into integer value: from Shared.DC.xml.ppml import u64 as decodeObjectId oid = decodeObjectId(getattr(<Object instance>, '_p_oid')) Is it possible to get object itself having it's _p_oid? I tried this: from ZODB.utils import p64 object = <RootObject instance>._p_jar...