Planet Plone

This is where developers and integrators write about Plone, and is your best source for news and developments from the community.

February 12, 2016

David "Pigeonflight" Bain: Using Requirejs to load Jquery UI from a CDN

by David Bain at 2016-02-12T08:47:00Z

This post discusses how to use Require.js to load an external library.
This post discusses how to use Require.js to load an external library.

One big benefit of Require.js is that it allows a developer to reliably load javascript modules without introducing dependency related conflicts. It also requires a little more code to achieve this. I needed to do this recently because Plone 5 now manages the loading of javascript modules and dependencies using Require.js. If you're curious you can read more about use of Require.js is Plone.

In Plone 4.x you basically use the plain old javascript approach (with a bit of jquery magic) to load and run your scripts. Loading and using the Jquery UI datepicker might look like this:
<script src=""></script>
    $(function() {
    $( ".my-calendar-box" ).datepicker(
        { dateFormat: "dd/mm/yy" }

With the introduction of Require.js in Plone 5 the code above would now look something like this:

    "paths": {
      "jquery-ui": "//"
require([ "jquery", "jquery-ui" ], function( $ ) {
            dateFormat: "dd/mm/yy"

Note that when we define the path to "jquery-ui" the ".js" is removed from the end of the path. We can now call our newly defined "jquery-ui" module by using a require() call.
Plone 5 ships with some common modules such as jquery so we only need to  require "jquery".

If you want to get a list of all the javascript modules that Require.js has already loaded, run the following command on the javascript console of your Require.js powered app:

It is more common to put all your require.js related code in a separate ".js" file and then load that file. I have notes on doing something like that with SemanticUI.

Plumi: Debian Jessie Compatibility

by anna at 2016-02-12T05:52:14Z

Core Plumi maintainers are still working towards compatibility with latest Debian release.

Assistance welcome! :)

February 11, 2016

eGenix: Python Meeting Düsseldorf - 22 New Videos Online


The following text is in German, since we're announcing videos available from a regional user group meeting in Düsseldorf, Germany.

Was ist das Python Meeting Düsseldorf ?

Das Python Meeting Düsseldorf ist eine Veranstaltung, die alle drei Monate in Düsseldorf stattfindet und sich an Python Begeisterte aus der Region wendet.

Bei jedem Treffen werden Vorträge gehalten und anschließend in Diskussionen vertieft. Die Meetings dauern üblicherweise ca. 2 Stunden und münden anschließend in eine Restaurant-Session.

Teilnehmer kommen aus ganz Nordrhein-Westfalen, hauptsächlich allerdings aus der näheren Umgebung.

Neue Videos

Um die Vorträge auch für andere Python Enthusiasten zugänglich zu machen, nehmen wir die Vorträge auf, produzieren daraus Videos und laden diese auf unseren PyDDF YouTube Channel hoch.

In den letzten Wochen haben wir die Videos der letzten Treffen aufgearbeitet. Insgesamt sind 22 neue Videos dazugekommen. Viel Spaß damit:

Python Meeting Düsseldorf 2016-01-19

Python Meeting Düsseldorf 2015-10-21

Python Meeting Düsseldorf 2015-07-29

Python Meeting Düsseldorf 2015-04-29

Die vollständige Liste aller mehr als 90 Python Meeting Videos ist über unsere Video Liste verfügbar.

Weitere Informationen

Weitere Informationen und Termine rund um das Python Meeting Düsseldorf stehen auf unserer Webseite:


Viel Spaß !

Marc-Andre Lemburg,

February 10, 2016

Reinout van Rees: Just one comma

by Reinout van Rees at 2016-02-10T11:28:00Z

In Django, if you say managed = False in a model's Meta, you tell Django not to touch the database table. So: no automatic database migrations, for instance.

Now, what is the problem if you have managed = False, and Django does do migrations?

Some of you will have seen the error already.

The comma after False is the problem:

>>> a = False,
>>> a
>>> bool(a)

The comma turns it into a tuple. And a non-empty tuple evaluates to True!

I found it quite funny. My colleague was torn between "extremely relieved" and "extremely annoyed" :-)

February 05, 2016

Gil Forcada: Make code analysis cleanups brainless

by gforcada at 2016-02-05T00:56:34Z

I wrote a small guide with a step by step instructions on how to cleanup a package code so that it follows our Plone style guide.

To add sugar on top, the packages that are already monitored for it, point you to that same guide, see it in action.


February 03, 2016

Paul Everitt: Making the material for the Polyglot webinar

by Paul Everitt at 2016-02-03T16:05:29Z

Tomorrow we do Part 2 of our “Polyglot Python with PyCharm” webinar, talking again about modern web frontend development, from a Python perspective, within PyCharm. We put a lot of work into writing materials for this. Why, and what’s next?

In the first webinar, I spent a lot of advance time breaking down the session into a series of steps, building a ToDoMVC-style application with a Flask-Restless backend. I wrote the code, then near the end, found a fatal flaw in the “pedagogy” of the sequence, and had to rewrite it. Only to find another, repeat.

Near the deadline, I decided to put everything in a publicly-visible repo, so webinar viewers could follow along. At the very last second, I put the notes I was using to guide my progression, into the repo as well.

Two unexpected outcomes…first, I ran out of time. In fact, I ran out of time at the point where I was showing the really cool part that everything had led up to. Next, the feedback showed that registrants really wanted the material, with explanations, in advance.

I had been planning for a while to write a series for this. This crazy frontend world is hard to decipher for Python folks, but we know we need to jump in. I wanted to be a guide, explaining this world in Python terms, and showing how to couple it to Python-based backends. Also, if you get fully into that world, you’re better off with IDE help, and PyCharm is *very* unique in that regard: first-class Python and first-class JS/HTML/CSS support. In fact, many of my Python friends didn’t know PyCharm could do what WebStorm does.

So I used this second part of the webinar to write up all the story for this “Polyglot Python with PyCharm”. It is a series of articles on each part of the equation, followed by a start-to-finish ToDoMVC application. For those familiar with my “Quick Tutorials” for Pyramid, it’s that kind of approach. Individual slices, with a lot about the “why”, plus working code.

Here’s the (current) table of contents. For the material, register for the webinar and you’ll get the link, or wait until next week:

  • NodeJS for Python and PyCharm Developers
  • JavaScript Packaging with package.json
  • Linting with ESLint
  • Automation with npm run Scripts
  • Modules with CommonJS
  • Browser Bundling with Webpack
  • Browser Debugging from PyCharm
  • TDD with Mocha
  • ES6 Imports with Babel
  • Pythonic JavaScript with ES2015
  • DOM TDD with JSDOM
  • Initial ToDoMVC
  • Frontend Tooling for ToDoMVC
  • Moving the Frontend Out of the Backend
  • Bundling ToDoMVC with WebPack
  • ES6 Imports for ToDoMVC
  • Pythonic JavaScript for ToDoMVC
  • TDD for ToDoMVC

I still have more to do to finish this after this week: fill in the missing writeup on the ToDo app, do a tenth-round of rewriting, and make a screencast video for each article. Also, it’s tied to a new blog for me which isn’t yet really official.

But in general, we think PyCharm has fantastic story for Python-backed frontend development, and this series is a commitment to being your guide. Hope to see you tomorrow in the webinar.

January 30, 2016

Florian Schulze: Let’s Encrypt certificates for private servers

by Florian Schulze at 2016-01-30T10:38:00Z

At the end of January 2016 Let's Encrypt fixed the last bug which prevented letsencrypt-remote from authenticating via DNS.

It is now possible to generate TLS certificates for private servers if you can delegate name resolution via your DNS provider.

Let's say you want to generate a certificate for use on your Laptop. You first need to create a subdomain pointing to Something like this in your zone for

localhost  IN A

Additionally you need to delegate to an IP which is reachable by the Let's Encrypt servers and where you can access DNS port 53. For example your web server if you have one:

_acme-challenge.localhost  IN NS  www

If you use your web server, you could use ssh to forward the port 8053 to your laptop:

$ ssh -R 8053:localhost:8053

You then need to use something to forward remote UDP packets from port 53 of the server to the forwarded TCP port 8053, for example socat:

# socat -T15 udp4-recvfrom:53,reuseaddr,fork tcp:localhost:8053

Now on your laptop you can use letsencrypt-remote to create a certificate using DNS:

% letsencrypt-remote --dns

If everything worked correctly:

  • letsencrypt-remote should have started a DNS server
  • requested certificate signing
  • the Let's Encrypt servers should be delegated to your server for the DNS query
  • the request be forwarded to your laptop
  • the answer sent back
  • and you got a signed certificate for

This also works for other private ip ranges like or

Gil Forcada: Towards more maintainable code

by gforcada at 2016-01-30T00:53:52Z

On my talk at the Plone Conference 2015 (slides, talk notes from Maurits) one of my points was that a written style guide is worth nothing if you can not check/enforce it.

Who cares what a style guide says regarding indentation, dependencies, string quoting, docstrings, handling i18n, etc etc if then one can freely commit changes that go against the said style guide?

Fortunately in Python we already have pep8 (the tool) and flake8 (with its great plugin ecosystem). To top it off,  on Plone we already have plone.recipie.codeanalysis. We have the tools.

Talk is cheap

I’ve been putting as much effort and free time as I could to make that happen.

plone.recipe.codeanalysis has been improved1, flake8 plugins have been written, and finally during this last Alpine City Strategic Sprint 2016 I could implement the missing piece: report back to the users (see an example)!

The script is fairly simple:

#!/usr/bin/env bash
wget -O
wget -O qa.cfg
wget -O .isort.cfg
python -c qa.cfg
bin/buildout -c qa.cfg

Run the above on any Plone distribution and see the output collected on parts/code-analysis/flake8.log

Currently only a few packages are checked, but cleanup tasks can start on any Plone package as of now. Be sure to ask for a job that will check that the package remains clean as soon as your cleanup changes are merged!

Keep on!

  1. and by no means only by me

by gforcada at 2016-01-30T00:08:43Z

This past five days I had the pleasure the be part on the last Plone sprint: Alpine City Strategic Sprint 2016, what a blast!

In the following days, the amazing never running out of steam, Jens will report back to the community. A partial/preview report already exists for the impatient ones (disclaimer: I made it, so there’s probably quite a few things missing).

Below I will make a summary of what I achieved thanks to being part of the sprint.

Work done


  • bring back node4 on Jenkins: meaning that we can run more jobs at the same time, really handy for a sprint or at release time/high activity!
  • quickly update (totally untested, so dragons ahead) ZODB, Zope, ZTK and CMF jenkins jobs, now they are bundled  together in a tab. Pointers on how to make them reliable/improve them highly appreciated, submit tickets for it so we can keep track of them
  • create jenkins jobs for PLIPs being worked on during the sprint. In retrospect they took me less than 5 minutes of work1 and they proved to be extremely helpful. Pro tip: whenever working on a new PLIP ask for a jenkins job!
  • create more jenkins jobs for checking, and reporting back, code analysis on distributions (more about it on a follow-up post)


Fortunately all the above took less than one or two hours, my main task during the sprint was, together with Maik, bring collective.indexing in Plone core without having to add yet another package2. Please read the PLIP description, linked above, to know the scope of it.

As of now we are down to one single test failure! We are highly appreciated on creative ways to solve that last one…

Not only work

A sprint is way more than just sitting in front of a laptop and coding!

Lots of interesting discussions where held, we had lots of fun, we did some sightseeing and enjoyed being together.

And after that I can only say that Plone’s future is brighter than ever has been!

As a personal pet peeve, we finally agreed (?) on how to sort imports! :-)

Last words go to Jens and Christine for taking so much care on preparing everything and being so open and helpful at any time, thanks!

  1. thanks to jenkins-job-builder
  2. which our release manager will probably welcome for a change

January 27, 2016

Benoît Suttor: How I made my wedding site

by Benoît Suttor at 2016-01-27T10:16:27Z

So I'll getting maried !

I decide to make a website for my wedding with a list of gift, my honneymoon, presentation of my witnesses and so on.

I was looking for a litlle CMS with a "list of gift" (an online shopping) which can be installed on cheap and reliable hosting (An it's when I loose Plone)

Pyramid vs Django

I started looking on Pyramid (because I'm a Plone/Zope dev). I thought Kotti, but I didn't find a way to make easily gift, and I thougt project looks cool, but it'was maybe a little young for my kind of requirements. I didn't find good solution on pyramid for a wedding list. 

Such as I have some exprience in Django, And in my daily work, we started intereset on Geonode for GIS project.

-> I started looking on Django !

Django CMS vs Mezzanine

Django CMS and Django CMS e-commerce plugin. But it seems this project is a almost dead ? Last commit on github make me septic.

With little search, I found Mezzanine and Cartridge. I try it and It seems perfect for my porject, So I choose it !


My first choose was OVH, because it's very cheap (5€ / month). But with little search, it is almost impossible to create a complex Django site (by complex, I mean a "Mezzanine" Django site, and it's not very complex). I pursued my searching... And I found Webfaction. They have local pythons, postgres, 600Go data for 10 € / month. It looks perfect for me, except they do not manage domain name directly. So I host my wedding site on webfaction and my domain name on OVH.

Maybe I could made an heroku Django website, but I was little affraid about complexity.


Next step is to create an online shop with Kotti or with Pyramid !

January 21, 2016

David "Pigeonflight" Bain: From Zero to Plone - Towards faster on-boarding

by David Bain at 2016-01-21T15:51:00Z

About 4 months ago we took on a new developer and I started by explaining that it takes about 3 months to become confident with Plone. Being a confident developer he took this as a challenge, assuming that he would be over the learning curve within 3 weeks.
About 4 months ago we took on a new developer and I started by explaining that it takes about 3 months to become confident with Plone. Being a confident developer he took this as a challenge, assuming that he would be over the learning curve within 3 weeks.

After 4 months plus of working with us I asked him to give me his feelings about my 3 month timeline. This was his response (with a few additions from me):

"I think I'm comfortable with it. However, it [depends on] the type of task you've given me... I might be uncomfortable with [doing a migration]. It's like giving a recently graduated doctor the task of performing a heart surgery as his first task at the hospital..."

So he's comfortable with some tasks but there are others that will require more experience.

I've actively been experimenting with ways of making Plone easier for at least 3 years (and less actively for longer than that). In that period I've come up with the idea of Plone Drills, created a Diazo Snippets Library and Chrome Plugin, worked out fast cloud based installation of Plone, done work on a Plone Newbie Developer Toolkit (Plone 4 only), contributed to Alex Clark's Plock Plone Installer project and spent a lot of time on a theming approach for Plone which "extends" Diazo called Gloss. I also created a short video series related to using Gloss with Webflow.

I'm still haunted by this problem space and the general idea of on-boarding web developers. It's led me to my latest side project, the aim being to provide a faster on-boarding experience for new Plone developers. I've been calling it a book but that might be a poor description since it will most likely involve more than just a text.

BTW... If you are interested in the fastest way to get going with Plone then I'd encourage you to sign up for my upcoming book/project/thing. You should see the option to sign up somewhere on this page.

January 20, 2016

Affinitic: Automatically pack your Plone instances (without zeo)

by Laurent Lasudry at 2016-01-20T09:35:15Z

At Affinitic, we have many Plone sites on our servers and we wanted to pack their ZODB automatically.

Our goal is of course to do it without any downtime. It’s easy when you have a zeoserver, but you cannot use a packing script when there isn’t :

zc.lockfile.LockError: Couldn't lock 'instance/var/filestorage/Data.fs.lock'

We decided to simply do a wget on the ZMI packing form.
Here is the command to pack your main database (7 days) :

wget --max-redirect 0 --post-data='submit=Pack&days:float=7.0' http://user:password@localhost:8080/Control_Panel/Database/main/manage_pack

We wrapped this in a script to get meaningful exit code and this is deployed via Puppet to have a cron for each and every Plone instances. Even the user that is used to access the instance is created via Puppet with :

bin/instance adduser user password

Alternative method, not used for deployment reasons and using a Python script :

If it can help anyone …

January 18, 2016

Florian Schulze: New statically generated website using Lektor

by Florian Schulze at 2016-01-18T11:40:00Z

After several years and multiple attempts, I finally have a website again.

I tried quite a few static website generators, including starting my own, until I finally settled with the recently announced Lektor.

The main addition to Lektor is my reStructuredText plugin lektor-rst. I had all the old content in rst already and I favour it over markdown.

The source code for my website is available on GitHub at

January 17, 2016

Andreas Jung: launched


A new website dedicated to PDF generation using the CSS Paged Media approach

January 13, 2016

BlueDynamics Alliance: Watch all your repos


Keep yourself up to date with what's happening in GitHub organizations.