Posts – Page 8

Linux: Make time with faketime

So you, like me, have hit a situation where you’ve got a time-sensitive application that won’t run? Maybe you’ve downloaded one of those apps (like a demo) that won’t run after a certain date and time because it’s “expired”. Or else, maybe some other arbitrary time constraint is keeping you from running a Linux (or even Windows) program. On Linux (Ubuntu for me), there’s faketime to the rescue - a very handy tool that does what it says on the box, changes the system time for given command.

After installing faketime by something like:

sudo …

Plone 4: Local Zeo blobs conflict with Plone instance

As the title suggests, there’s a conflict between a Zeo database instance being run together with a Plone 4/Zope instance, and them trying to share the same blob storage folder.  But, this only happens if you misunderstand or incorrectly set the option of  shared-blob = off, and blob-storage to be the same location as for Zeo in your buildout. If that previous set of (seemingly jumbled) thoughts doesn’t make any sense to you, then move along, nothing to see here.

By default, at the time of writing, blob support within Zeo runs with the bushylayout, and creates …

Plone: SiteManager leftovers; not the good kind

Note

Update: You should check out wildcard.fixpersistentutilities - it’s a fantastic solution to problems like this. Many thanks to Nathan Van Gheem, the author of the add on. Check out the link and see how to install it (temporarily) on your Plone instance that needs its site manager cleaned up.

Leftovers are typically useful when they’re in your fridge at home. They mean you don’t have to mess around making lunch for the next day for work, and can just grab them, and walk right out the door. Now, leftovers in the zope.component SiteManager aren’t …

Plone, Dexterity, and Incorrect Widgets

A nice ‘gotcha’ is the distinction between Zope’s schema.Date and schema.Datetime. The difference is obvious and straightforward when the two terms are laid out side-by-side: one is for dates only and the other adds a time component. Where things fell down for me in my usage of these fields with a Dexterity-based content type in Plone is the human component. When these fields are mashed in together within a lot of other text/Python/names, it’s easy to miss those 4 little letters of ‘time’. This lead me trying to use a DatetimeFieldWidget when I really …

Plone/Zope: Using LDAPUserFolder with posixGroups

Due to various reasons, the Products.LDAPUserFolder package available for Plone and Zope doesn’t support POSIX groups.  The ‘official’ (ish) reason for this is because of the fact that these groups don’t store full distinguished names (DNs) for members.  It makes some degree of sense, because a user ID like ‘david.test’ isn’t strictly unique.  On the other hand, these types of groups are quite common in LDAP implementations; not supporting them without giving it at least half a shot to find the user seems a bit strange.

Here’s where a quick patch steps in. Thanks …

Virtualenv, Python 2.4, Plone 3.x and Lucid Lynx (Ubuntu 10.04)

These titles of my posts just keep getting longer and longer.  For those of you paying close attention (I know who you are), this is the next in my series of getting the above-mentioned tools working together. Previously, it was Centos 5.x, Jaunty (9.04), Karmic (9.10) and now Lucid (10.04).  Only subtly different, each of this distributions has pretty much called for its own post on the matter of getting a working Plone 3.x / Python 2.4 virtualenv installation going.  So, here goes this time around.

Install Python 2.4 first

If you’ve not …

Things to do on Ubuntu 10.04 Lucid Lynx after install

I’m skipping actually quantifying the number of things to do because this post will undoubtedly get updated as time goes on.  I’ve just updated both my computers (personal laptop and work desktop) to Ubuntu 10.04 from 9.10 and I’m very happy with how things have gone. That isn’t to say a few minor things haven’t annoyed me, such as Project Hamster removing its Day view for task management or Python 2.4 being dropped entirely, but overall, it’s gone well. Here’s my thoughts on what you should do as soon as …

Installing Python 2.4 on Ubuntu 10.04 Lucid Lynx

Whoops.  No one sent me the memo that Python 2.4 support was being removed entirely from the latest version of Ubuntu, 10.04 Lucid Lynx.  To be fair, I was presented with the message that ‘these outdated packages will be removed’ and in that list was python2.4.  I made the unfortunate assumption that this just mean the package was outdated (which it certainly is) and I’d have the ability to install it again in Lucid.  There were a number of different packages on the list and in order to save time, I let the updater remove them …

Good Morning World Plone Day!

Good morning from the land down under and welcome to World Plone Day 2010! It’s right on the hour (well, just after now) and 28 April 2010 — and yes, that’s World Plone Day to the uninitiated. To celebrate and to mark the occasion, I’ll be holding a bit of a discussion today about what Plone is, why it’s so useful, and what we, as users, are hanging out for in Plone 4 and above. But, what fun is that without sweets to eat?  And what’s potentially tastier than Plone?  Plone cupcakes!

Thanks to some great …

Plone and Dexterity: Working with computed fields

Today, we’re looking at how to utilise computed fields within a Dexterity-based content type. The specific use-case is that of having two separate fields (first name and surname, for a Person type, for example) generate the complete object title. The first part of this — having the title of the content displayed correctly — is pretty straight forward once you know what documentation to read and understand how things happen. The second part — having the ID of the content correctly generated to be first name/surname is slightly more complicated.

Title computation and display

Let’s look at the first part …