سؤال

I have a file Data.fs that contains data persisted by Plone on ZODB. Only the standard content types of Plone were used (eg. ATNewsItem, ATLink, ATFile, ...). I would like to use Pyramid (www.pylonshq.org) to access this data (only read, no write) and can recover, for example, the title of an NewsItem or Link. Is there a way to do this?

هل كانت مفيدة؟

المحلول

To read the information you'll need to have the original classes available for import; the pickles can only be loaded into the original class structures.

I am not sure that will work all that well; there are a lot of assumptions and dependencies that may clash with the Pyramid framework, or cannot be satisfied without the Zope framework being available.

An alternative would be to create new classes that you make available through the original import locations that let you at least just read the contained data, but that could amount to a major effort.

If you need read-only access you may want to look into a different approach though; use some means to export the data to, say, a SQL server. That will be easier to handle in the long run.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top