Templer and ZopeSkel
At the sprint following Plone Symposium East, I helped Cris Ewing write documentation for Templer, a Python code generation system that was derived from the older ZopeSkel application. I knew very little about Templer before the sprint, but the experience taught me that it is an incredibly useful tool for Python developers working with Plone, Django, Pyramid, or any other Python framework. Whether you are a freelancer or part of a larger web development organization, Templer can make you more productive.
Templer is a general-purpose system for generating code skeletons from pre-defined templates. End users provide information through an interactive interface, which is used to generate a skeleton of files and folders that make up a Python project. The projects that can be built with Templer today are:
- Python namespace and nested namespace packages
- Buildouts and recipes to extend the zc.buildout system
- Namespace and nested namespace packages for Zope
- Add-on packages for the Plone CMS
There are also commands (based on Python Paste) for adding features to Plone software projects that were created with Templer, such as browser views and Archetypes content types.
The functionality that Templer provides is very handy, but the thing that makes it a Python developer’s secret weapon is the fact that it can be extended and used to build applications focused on particular problems. ZopeSkel, which provides a suite of templates for generating Zope and Plone projects (buildouts, themes, add-ons, etc.), is one example of a Templer application. During the sprint, Ian Anderson began work on templer.django, a new Templer package to provide templates for Django projects. This package could form the basis of DjangoSkel, an application to quick-start Django projects. If you are in the business of creating Plone or Django websites, you can quick-start your own projects with a Templar based application. For example, MyPloneSkel could set up your production and development buildout configs just the way you like them, plus optional packages for Generic Setup policies, a Diazo or standard theme, and custom content types.
Thanks to everyone who has worked on ZopeSkel and Templer over the years to make such a useful suite of tools.
Kale Will Save the World
I have to hand it to the University of Minnesota Press, they do a great job keeping their homepage fresh. It has lots of portlets around the edges, and a big slot in the middle to hold a featured image. Every few weeks they swap a new image into that slot, and voilà! new homepage. This week’s UMP homepage features kale. Really. It made me both laugh and click (which took me to a page featuring local food writers and their books.) Their first hompage featured rock music (captured in the client blurb on our website), and by the time you read this it will probably be featuring something else. But whatever is featured, you can bet it will be intriguing and will draw you into exploring UMP’s amazing catalog of books.
Kudos to our partners, Might & Main, for a compelling design (it even looks good on mobile devices) that can be refocused with a single image upload. And kudos to the Plone CMS for making this so easy to implement. We used ContentWellPortlets to provide the bottom porlet slots. The central image goes into the homepage body, and the rest of the content comes from normal Plone text, RSS, and collection portlets. The site is themed using Diazo (via plone.app.theming), but the homepage magic is mostly CSS. The various portlets are styled depending on their location (right, left, bottom), plus there is extra CSS for the Twitter and New Releases portlets. This tyling is made possible by the fact that Plone provides CSS identifiers for just about everything on the page.
The result? A homepage that keeps surprising me.