Python Programming, news on the Voidspace Python Projects and all things techie.

Zine: the New Python Blog Engine

emoticon:ghostradio As I type this, it is already old news - but still good news. For a long time the blog engine of choice for hosting your own blog has been Wordpress. Unfortunately Wordpress is written in PHP, and pretty hairy PHP by all accounts, so to Python developers customizing Wordpress has never been an attractive option.

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: the Python Blog Engine with Ambition

    Zine is an Open Source personal publishing platform written in Python. It's written with security and extensibility in mind and inherits many ideas of WordPress and other existing blogging systems.

It had its first release very recently and is now at version 0.1.1. There is a flurry of activity towards both 0.1.2 and 0.2.0 releases. I've been experimenting with it by creating a news blog for my book IronPython in Action:

Zine has a very interesting looking plugin model; but as you can see I haven't even had time to create a custom skin for it, let alone experiment with writing plugins. Smile

Even though I haven't explored too far the team behind Zine is led by Armin Ronacher, one of the geniuses behind projects like Jinja, Pygments and Sphinx, so I have faith that the code quality is high. Security is highlighted as one of the core features of Zine, which is both promising and something for it to live up to...

Administrating Zine is very reminiscent of using Wordpress, in fact the admin login page is virtually identical! Zine is still at an early stage of development, so there are lots of missing features and a few minor bugs (one of the bugs being that the admin interface in 0.1.1 doesn't work with IE - something I suspect some of my readers may see as a positive!). Although it is really only for the earliest of adopters what is already there is extremely slick. Through the admin interface you have all the control over the blog that you would expect: creating and editing posts, administering comments and categories, switching themes and adding plugins and so on.

Perhaps the biggest hurdle Zine has to overcome is the deployment issue, which is where PHP has always shone. Thankfully even the cheapest of accounts at Webfaction will suffice, and within minutes of asking on their forums one of the admins replied with full step-by-step installation instructions!

Webfaction already has 'one-click' installers for setting up many applications, so when Zine is a bit more mature installing it should be a breeze if you have the right web host...

The biggest missing feature is a WYSIWYG editor; current choices for creating entries are HTML, Markdown or Zine-markup (undocumented but apparently similar to HTML). My first plugin may well be a docutils plugin allowing you to create posts in ReStructured Text.

Zine is implemented as a WSGI application using the Werkzeug toolkit. In some ways it is a shame that it isn't based on Django or Turbogears (2), making it really only suitable as a standalone blog rather than a potential pluggable application [1]. Just as the most popular blog is written in PHP, all the forums are too. If you are creating a web application with Python and want to include forums and a blog as part of the site you are likely to end up with a disconnected solution - potentially requiring users to have multiple login credentials for accessing different parts of the same website!

This is what happened at Resolver Systems. Initially we needed a company blog and support forums; so going with Wordpress and phpBB made sense. As we migrated our customer account management to a custom Django application (giving people access to downloads, storing their newsletter preferences and so on) we wanted to avoid the multiple login problem.


Originally our account management was in hacked-together PHP as it really did very little. The move to Django was partly inspired by a very interesting new app that we will be announcing shortly. One nice side-effect of the web development is that I've been able to spend the last few days working with both CPython and Django. It's been great fun. Smile

My boss, who created the first iteration of these applications [2], solved this problem by allowing Django and phpBB to share login credentials. People who create user accounts on the main web app can use the support forum without creating a new account or even having to re-login - and vice-versa. Specifically Giles modified phpBB so that it could accept Django sessions.

As this must be a common problem Giles has made the code open source.

The long term solution is for the Python community to create a compelling forum. For Django Pinax is a promising home for this kind of pluggable application.

[1]OK, so in theory any WSGI app is pluggable - but I'm not sure how easy it would be for a host application to share an authentication system with Zine. It wasn't designed with this in mind...
[2]I haven't seen him so happy at work in a long while - he was actually getting to code again!

Like this post? Digg it or it.

Posted by Fuzzyman on 2009-01-09 23:15:21 | |

Categories: , Tags: ,

2008: A Year in the Life of Voidspace

emoticon:fish For me 2008 is inevitably the year in which I didn't get IronPython in Action finished. I actually started writing in the tail end of the 2006 Christmas break, making it two years and counting since I started. Yesterday Christian and I received an email from Manning setting out a timetable for the final stages, setting not only this year for going to press - but also hopefully next month!

In a mere handful of days we will no longer be able to make any changes to the book and it will go into proof reading; genuinely the final stage before publication.

Despite being buried in writing for the entire year (or what feels like as far back in history as I can remember) it has still been eventful. I spoke at nine conferences, mainly on IronPython:

Some of these even want me back and I have booked dates for BASTA 2009 (German Developers Conference), PyCon US (giving a tutorial on IronPython and a talk on testing) and ACCU 2009. I haven't yet submitted a talk proposal for EuroPython, and I'm still wondering what to talk about. This year EuroPython is hosted by the PyCon UK team, of which I am a member, but even though it is on UK soil I've technically never been to EuroPython before so I may be able to get away with an introduction to IronPython. Smile

One of the highlights of the year was being made a Microsoft MVP, this was a nice recognition of the work I've done in the IronPython community - even more so as I am the first MVP for the dynamic languages team.

During the year I wrote an article on ConfigObj for the Python Magazine and several articles on embedding IronPython and Silverlight. As IronPython 2 was changing rapidly through the year, several of these fell out of date. More news on this in another blog entry...

Due to the pressure of working on the book I only managed 133 blog entries on the Techie Blog this year. I did however manage around 320 entries on IronPython URLs, just shy of the one a day average I thought I might manage.

As for Voidspace itself, its been an interesting year. Here's a summary of the stats as reported by awstats [1]:

  • 1 058 260 visits
  • 2 030 564 pages served
  • 341 GB bandwidth
  • 77% Windows
  • 8.7% Mac OS X
  • 11.8% Linux
  • 40.8% Internet Explorer
  • 45.5% Firefox
  • 5.2% Safari
  • 2.7% Opera

The top 10 pages for the site (not all technical but defunct pages skipped) are:

My top 10 referrers for the year were (removing one referrer spam and combining a few):

Traffic from reddit really grew this year. I think this is because reddit is growing and not just because I write controversial blog entries!

Awstats records referrals from search engines separately, and lumps several other sites in as search engines. Google massively overwhelms anyone else in this area:

  • Google (512 883)
  • Google Images (210 379 - explains why the pictures are in the top ten pages)
  • Yahoo (19 214)
  • Stumbleupon (16 662)
  • Windows Live (8 286)

My website is vast and sprawling (and badly in need of a re-theming and a pruning), so it is not only technical visitors. Unfortunately (for me) in late 2007 Google change the way they record clicks on adverts - leading to a drop in my advertising revenue of approximately 50%! Oh well, I do have a day job as well. Smile

[1]Which probably slightly over reports; bots that misidentify themselves will be counted as visitors. For that reason I have excluded all visitors to pages that have forms on then and tend to get hit by spammers. On the other hand the cron job that updates my stats seems to occasionally clash with the log rolling over and drops a couple of days a month - so it all balances out in the end.

Hosted by Webfaction