Rick Hurst Web Developer in Bristol, UK


Category: plone

World Plone Day – Bristol, UK

Today is World Plone Day.

From the website:

“The World Plone Day (WPD) is a worldwide event. Our goal is to promote and educate the worldwide public about of the benefits of using Plone in education, government, ngos, and in business.”

We held an event in Bristol, which I streamed and recorded via ustream – available here. I did a lightning talk on how to use plone out-of-the-box as a small company intranet and searchable knowledge base, other talks included “big plone”, contributing code back to the community and KSS.

The video was streamed straight from the webcam and built in mic on my macbook, so the sound quality isn’t great, especially when the fan kicked in, but it was a bit of a last minute effort. Next time it will be camera, mic and tripod!

Review: Professional Plone Development part 1

Firstly an apology: I was sent Martin Aspeli’s Professional Plone Development for review back in October last year, and I still haven’t got round to reviewing it – not out of laziness, but extreme time shortage due to going freelance/ starting a company last year. Hopefully I can make amends now by reviewing it section by section as I jump into Plone 3.

A bit of background about me and Plone: I have worked predominantly with Plone for about 4 years, coming from a background in classic asp and php. My area of Plone expertise is front end templating and skinning, which was my main area of usefulness at Netsight for a couple of years. I have also presented a couple of Plone based workshops at Bristol Skillswap, attended two Plone conferences and a Snow Sprint. Despite this involvement with Plone, I have had a love/hate relationship with it, at times thoroughly lost deep down in the software stack, and fighting my tendency to think purely in terms of scripts and relational databases, other times singing it’s praises to anyone who will listen. Since leaving Netsight I have only worked on one Plone (2) project, as i’ve gone back to my old ways, favouring php for most projects, but just got stuck into an inherited Plone 3 project, and started using a vanilla Plone 3 site as a knowledge base/document repository/intranet/extranet for my own company, olivewood. (Hosted on a mac mini in-house, which I thoroughly recommend, but that’s another post!).

I’m currently feeling a little lost, with the Plone 3, which is why I decided to finally start reading/ reviewing the book.
Ok, enough about me, lets talk about the book: I opened the book last night and read through the foreword by Alexander Limi, and the first chapter. It left me with a fantastic feeling about Plone and the future of Plone – it summarised what is different about Plone, and how important (and fun) it is to participate in the Plone community to get the best out of it – the polar opposite to working with a proprietary product, where the vendor tries to cultivate a community around it, but it’s not the same. It also made me feel slightly guilty for moaning about aspects of Plone in the past – who exactly was I complaining to? I resolved to make sure that the next time something frustrates me, that I actively participate in making the situation better, i.e. to at least actively become part of the problem, if not part of the solution!

Chapter 1 covers Zope and Plone history, Plone as application vs Plone as framework, considerations for when deciding if Plone is the right tool for the job, and the importance of the community.
A couple of other things I learned from the foreword and chapter 1:-

  • The original release of Plone was built (predominantly*) by just two people, Alexander Limi and Alan Runyan who didn’t meet until Europython 2002 just after the first release
  • The Goldegg initiative is a sponsored effort to improve Plone’s framework stack, not a type of python egg!

Ok, I will try to deliver another installment as soon as possible, but i won’t necessarily be doing it in order – i’ll be skipping straight to chapter 8 (skinning)
* Building on top of Zope/ CMF – the work of many people!

archived comments


Thanks for buying the book. I hope you enjoy it. 🙂

I would probably read the chapters in order, or at least skim them in order. You’ll find it a bit hard to grasp some of the things chapter 8 otherwise. At least, I’d read chapters 3 and 5 first.


Martin Aspeli 2008-09-18 22:22:29

Thanks for the compliments on the foreword. Interestingly enough, that foreword has generated more nice personal emails to me than anything else I can remember writing. 😉

Alexander Limi 2008-09-18 23:15:37

Plone bulk update of default values for new attribute

Scenario: I added a new attribute “orderPriority” to a few different archetypes based content types. These attributes had default values. As this is an existing site, there were 400 or so existing objects that had not picked up these default values – i.e. they would only pick up the value after they had been re-saved. To make sure these objects picked up the default value I created a skin script, which I proxied as manager (watch out for indentation here, really must find a better way to display preformatted code):-

catalog = context.portal_catalog
# objects are all in folder /directory/listing/
listing_folder = getattr(context.directory, 'listing')

for brain in catalog(portal_type = ['NameOfMyContentType']):
print brain.portal_type + ' ' + brain.id + ' ' + brain.Title

listing = getattr(listing_folder, brain.id)
#this gets the default vakue from the schema
order = listing.getOrderPriority() #this sets it

return printed

I needed to be able to sort by this field in a catalog query/ Topic/SmartFolder/Collection so, so I then added the field as a fielindex in the portal catalog, reindexed the catalog (ZMI) and used the collection edit options in site setup to add it as a field

archived comments

What should also work is to go to the ZMI -> archetype_tool -> Update Schema tab and there update the schema of your content type (select ‘all objects’ to be sure to get them all; and check the ‘remove schema attribute’ box when it is available).

Maurits van Rees 2008-09-17 21:49:15

excellent, thanks for that – i’ll try that next time 🙂

Rick 2008-09-18 07:51:50


“Dexterity is a system to create content types in Plone based on Zope 3 schema interfaces and simple content classes, with z3c.form add/edit forms. It aims to explicitly supports both through-the-web type creation with a well-defined path to filesystem code (and back).”

I’m excited about this, cant wait to see it arrive in Plone.

archived comments

I’m glad you’re excited. 🙂

Will you be in DC? We’ll hopefully be working on getting a Dexterity beta out at the sprint.


Martin Aspeli 2008-08-28 20:15:21

I would love to be going to DC, but you’ve scheduled Plone conf to clash with my son’s birthday again 😉

Looking forward to trying the beta – happy to do testing and anything else I can contribute

Rick 2008-08-29 08:23:19

overriding the title attribute in an archetypes schema

Something I always forget to do when I override the title attribute in an archetypes schema (plone) is to specify accessor=Title (with a capital T). Omitting this leads to odd results, such as the ID of the plone objects created from the schema not being created from the title field, but something else (hmm.. the parent object’s title maybe?).

pdb and zdb – debuggers for python and zope

(updated 10/6/2008 – to reflect Dan’s corrections below)
pdb has long been on my radar, but I had kind of dismissed it as something for “proper” programmers, rather than a web monkey like myself. However, i’m pleased to say i’ve actually finally used it during some plone development! The trick (for me) involves running the plone site in foreground mode so you can see messages in a terminal, and then with pdb you can interact with it. In your python script you need to add:-

import pdb

when the script reaches this set_trace() statement, you get a pdb prompt in the terminal allowing you to interact with the script and it’s variables at that point. e.g. print myvar to get the value of a variable or myvar.__class__ to find out what type of variable it is. You can also use ‘n’ to step through the script or ‘c’ to continue to the end.

Up until this point I relied on adding print statements in the scripts to try to work out what was happening – a bit like i’ve done for all my web dev over the years – a common mistake for me is to leave these in, then get confused clients asking why the word “here” and “foo=[1]” keeps appearing on their website!

You can also use a similar tool to debug zope skin scripts. This uses a similar principle – run your site in foreground mode, and you can interact with the skin script from the set_trace statement.

from Products.zdb import set_trace

archived comments

Actually… it’s:

import pdb

zdb’s incantation is:

from Products.zdb import set_trace


Dan Fairs 2008-06-09 16:57:49

Plone hotfix – how to install it for those who might be nervous to do so

If you are anything like me, you might be nervous about installing the recent plone hotfix in case you either break something or are under the impression it involves some unix command line foo. Don’t worry, it is much simpler than that – the hotfix comes in the form of a product – download it, unzip it (well actually untar/ gunzip it) ,and drop it in your products directory and restart zope. Of course you will need access to your products directory, and the ability to restart zope to do this. If you haven’t then it is probably safe to assume that it isn’t your responsibility, so go and nudge whoever it is that deals with that stuff for you 😉

Interesting debate about TTW support in plone

Even though I seem to have slipped off planet plone recently (design or accident? – must find out!), i’m fascinated by the current debate about Through The Web (TTW) support in Plone. I must admit I have noticed a general “TTW is bad” vibe from hardcore Plone developers – in fact i’ve heard it said outright on many occasions. As a Plone integrator/ general web developer I can see the pros and cons of TTW, but i’ve certainly seen it as a selling point of Plone – people commissioning a CMS, even for a large corporate site or intranet often get excited at the possibilities of being able to make customisations and additions themselves without having to get expensive developers in to make changes – and why shouldn’t they? I’ve also been a position where i’ve taken on a few customisations of Plone sites where the most of the site lives in the custom skin layer, edited TTW and it is a great way to make minor amends on the fly, and something that i’ve always liked about plone, even though I am fluent with file system development.

archived comments

exactly. and now imagine a TTW implementation that lets you (still) do all that *and* plays nicely with filesystem based development. surely something desirably, no? 😉

and on a side note: i do hope to see more plone related things from you again… perhaps we might even meet again at a sprint or conference again… any chance of that happening?

Tom Lazar 2007-10-20 23:24:10

Hi Tom, sounds good to me 🙂 And yes I am still working with Plone – currently on an Intranet project where Plone was the natural choice, and I hope to be at Plone conf next year if it doesn’t coincide with my kids birthday like it did this year!

Rick 2007-10-21 08:52:12

what a coincidence… my oldest kid’s birthday was just one day before i left… it seems he had a wee bit better timing than yours 😉

Tom Lazar 2007-10-22 21:16:40