plonewars.com

June 25th, 2007

Maurits van Rees: Discovering GenericSetup

If you want to know more about the current state of the trunk of
GenericSetup, this thread on the CMF list is a good start.

I had some things to say there too, including a patch.

Rob Miller gave me some helpful pointers, especially about
import_various steps.

I learned some things from him and from rummaging around in the code
myself.

Context

A GenericSetup handler gets passed a context when called. This
context is not the Plone Site or some other content. It is a special
GenericSetup context, as defined in GenericSetup/context.py. One
of the things you can do with that context is passing it some text for
its logger so you get some messages in your log files and in the
GenericSetup log:

logger = context.getLogger('eXtremeManagement')
logger.info('eXtremeManagement_various step imported')

Various import steps

When you apply a GenericSetup profile (base or extension does not
matter) all registered import steps are executed. So if you have
an extension profile that only has a propertiestool.xml file,
still all import steps (which can be a few dozen) are run. If all
authors of those import steps have done their work correctly, all but
one exit immediately as they realize they do not need to do anything.

I will quote Rob Miller here:

It is the responsibility of an import step’s implementation to
ensure that it is indeed appropriate to perform its actions during
any given invocation of the step.

All of the XML-based import steps already do this; they check for
the existence of a specific XML file, and if they find it they
perform the action. If they do not find the file, no problem, they
do nothing.

The so-called importVarious steps, i.e. any step that uses a
plain old python function as its handler (as opposed to building on
the existing XML parsing infrastructure), must perform this check
explicitly. you could restrict it to only running when the intended
profile is the one being imported, or you could check for the
existence of a specific file within the profile. I like the latter
choice.

The summary in my own words: if you want to be a good CMF citizen, you
had better make sure that the importVarious step of your profile (or
any other import step you define yourself) is only executed when your
profile is applied and not when the profile of some unrelated product
is applied.

So, taking some pointers from how CMFPlone and CMFEditions do it, I
fixed eXtremeManagement. I added a file
profiles/default/extrememanagement_various.txt. This can remain
empty but it is clearer to add a comment, like this:

The eXtremeManagement_various step is run if this file is present in
the profile.

Then I changed setuphandlers.py:

def importVarious(context):
    # Only run step if a flag file is present
    if context.readDataFile('extrememanagement_various.txt') is None:
        return

For reference, this is the profiles/default/import_steps.xml file
that tells GenericSetup about this handler:

<?xml version="1.0"?>
<import-steps>
  <import-step id="eXtremeManagement_various"
               version="20070530-01"
               handler="Products.eXtremeManagement.setuphandlers.importVarious"
               title="eXtremeManagement: miscellaneous import steps">
    <dependency step="propertiestool" />
    <dependency step="catalog" />
    <dependency step="workflow" />
    Import steps that couldn't be mapped to other handlers.
  </import-step>
</import-steps>

So if you have a CMF/Plone product which defines an own import step
(like import various, but it can be a totally different step) please
make sure that this step only runs when your own profile is applied.

Upgrade profiles

GenericSetup now has support for profiles that you can use to upgrade
a product, instead of applying the complete profile again. I only
looked at the code and have not actually tried this. But this is
absolutely something I want to use in eXtremeManagement too. So I
will probably write about that later.

Maurits van Rees: Discovering GenericSetup

Originally from Planet Plone by Maurits van Rees


from Yoda http://plonewars.com/2007/06/25/maurits-van-rees-discovering-genericsetup/







June 25th, 2007

The Sprint Experience

Open source contributors largely work alone and remotely. Every so often, though, it’s worthwhile to gather in person. read more

The Sprint Experience

Originally from [Technorati] Tag results for plone


from Yoda http://plonewars.com/2007/06/25/the-sprint-experience/







June 25th, 2007

Workflows — Plone CMS: Open Source Content Management

Workflows — Plone CMS: Open Source Content Management

Originally from del.icio.us/tag/plone by lucciano


from Yoda http://plonewars.com/2007/06/25/workflows-%e2%80%94-plone-cms-open-source-content-management/







June 25th, 2007

Embedding Jmol applet in Wordpress posts

A quick howto on how to embed JMol molecules into a Wordpress document. I’d imagine that this could be retrofitted to be embedded in any CMS, like Plone for example.

Embedding Jmol applet in Wordpress posts

Originally from del.icio.us/tag/plone by liquid_


from Yoda http://plonewars.com/2007/06/25/embedding-jmol-applet-in-wordpress-posts/







June 25th, 2007

Danae and Andy’s website

Oh, cobblers. Didn’t realise that when I spent ages reading it. Argh.

Danae and Andy’s website

Originally from del.icio.us/tag/plone by pauldwaite


from Yoda http://plonewars.com/2007/06/25/danae-and-andys-website-5/







June 25th, 2007

Danae and Andy’s website

Danae and Andy’s website

Originally from del.icio.us/tag/plone by pauldwaite


from Yoda http://plonewars.com/2007/06/25/danae-and-andys-website-4/







June 25th, 2007

Objectis

Objectis is a new free service that lets you manage your own Zope or Plone applications. Whether you are an intermediate Zope developer and want to have your own dynamic web site, a content manager addict and want to have your own Plone to play with.

Objectis

Originally from del.icio.us/tag/plone by dnlkrl


from Yoda http://plonewars.com/2007/06/25/objectis/







June 25th, 2007

Sidnei da Silva: Follow The Apple Black Brick Road

The Mac OS X 10.4.10 update has nearly turned my Macbook into a brick. It crashes upon login and dumps me into a console. From there I can login with my user, but not much else. It seems that something called “SecurityAgent” is crashing upon login. I’ve tried every single tip I could find. Nothing seems to fix it.

Following various threads on the Apple Support pages I found many similar reports but no solution so far. The only way I can get anything useful out of it is:

# /sbin/mount -uw /
# sh /etc/rc
# open ~

That will dump me into some kind of stripped down Finder, where I can then launch “Dock.app” and “SystemUIServer.app”.

This is really horrible. Shame on you Apple. I’m eager to know when the fix is going to arrive. If this really requires a reinstall like mentioned in several threads, I could just as well switch to Vista since I don’t have really have anything that requires OS X.

Sidnei da Silva: Follow The Apple Black Brick Road

Originally from Planet Plone by sidnei


from Yoda http://plonewars.com/2007/06/25/sidnei-da-silva-follow-the-apple-black-brick-road/







June 25th, 2007

Plone and Product Recommendations — InSmallSteps.com

Plone and Product Recommendations — InSmallSteps.com

Originally from del.icio.us/tag/plone by cjohansen


from Yoda http://plonewars.com/2007/06/25/plone-and-product-recommendations-%e2%80%94-insmallstepscom/







June 25th, 2007

COMPUTERWORLD – Empreendedores: Operações Linux voltadas ao exterior

COMPUTERWORLD – Empreendedores: Operações Linux voltadas ao exterior

Originally from del.icio.us/tag/plone by ericof


from Yoda http://plonewars.com/2007/06/25/computerworld-empreendedores-operacoes-linux-voltadas-ao-exterior/