In early 2009, IronPython hacker and well-known blogger Michael Foord wrote about Zine, Python’s (then) up-and-coming blog engine:
As Python is a cleaner and better structured language, with a bevy of capable web frameworks, a better blog engine that is much more fun to customize ought to be well possible. A new Python blog engine hopes to be exactly that: [zine]
Around that time, there was a flurry of activity surrounding Zine, the almost too-good-to-be-true Python blog engine which, while not quite as feature-complete as WordPress, was a strong option for pythoneers looking to blog. A Reddit for Zine was created. The project’s Trac instance had a small but growing collection of plugins, themes, and improvements pending. And as a simple Google search will reveal, plenty of sites still run Zine. And the last update was in 2009.
When we considered setting up a Python blog, my first instinct was to at least try to find a Python-based solution. Zine is still competitive, but given its age, I emailed the author, Armin Ronacher, to ask what had happened. He told me that at some point, he realized he didn’t need a CMS, and switched to publishing his site through a ReStructured Text build system.
The biggest drawback, frankly, is the size of the codebase, much of it with relatively little to do with blogging. Consider, for example, some code from the permissions enforcement module.
class _And(_Bin): joiner = '&' def __call__(self, privileges): return self.a(privileges) and self.b(privileges) class _Or(_Bin): joiner = '|' def __call__(self, privileges): return self.a(privileges) or self.b(privileges) class _Privilege(object): """Internal throw-away class used for the association proxy.""" def __init__(self, name): self.name = name @property def privilege(self): return get_application().privileges.get(self.name)
At this point, Zine could benefit well from a trimming of its codebase, to make use of newer libraries like WTForms and Repoze.what. But for now, you can download a modified version of Zine 0.2 with the following improvements:
- Redirects can be manually modified, created, and deleted from the admin GUI.
- Database setup problems are caught earlier in the setup process.
- Updated WordPress import schema version number. This mostly seems to work.
- Allow user to create a “/” slug for a root-level non-blog page.
- On the archives page, properly group by units of time that actually have postings. Skip months, days, and years without postings.
This small token of effort alone doesn’t bring Zine back to life. If only. But with a few more hacking sessions, maybe we can at least bring it up to speed with usability.