Home

Django Chunk's Legacy


Yesterday someone had emailed me about a small Django application I wrote a long time ago, in July 2008, called django-chunks. It’s a project I never migrated over to Github—until today—and to this date is probably one of the most “successful” things I ever wrote:

The idea here is that you can create a chunk of content, name it with a unique key (for example: home_page_left_bottom) and then you can call this content from a normal template.

It’s also the simplest.

I’ve not changed the application much since its inception. I think the only thing I ever changed, functionality-wise, was the addition of optional caching.

That has not stopped people from running with the idea and making vastly superior versions. The individual emailing me this past week was asking me if I’d like to add template tag evaluation within the chunks—think putting {% now %} into a chunk—and I politely declined and suggested he release his own fork if he liked.

This led me to check out all the different versions of this project and I was surprised at the number I found in a few minutes of Googling. I know it doesn’t sound like a lot, but to me, for such a simple idea, I was blown away that there are at least four projects spun off of this mini-app.

I should also take note here that I was absolutely not the first to ever write this app. Lots of people told me that they had developed similar apps for internal Django projects and either didn’t think to release them or couldn’t due to legal restrictions.

A list of the projects I found:

  • django-flatblocks — Horst Gutmann’s project builds on some other additions like an “active” flag, header fields, allows for the keys to be translatable, a view for editing the blocks, “createblock” and “deleteblock” management commands, and more.
  • django-freetext — A project by Kevin Fricovsky which had a better name ☺ and the aforementioned “active” field.
  • django-better-chunks — Adds i18n multi-language support and lets you tie chunks to sites if you’re using django.contrib.sites.
  • 0sn’s django-chunks — This one is pretty great because its almost identical to my original release of chunks. They’ve basically stripped out the caching support :)

Projects which are similar to or inspired by django-chunks but not derived directly from it:

All in all, I think this just speaks to the fact that people really want and need applications like these and I think it is supremely cool how so many people ran with or were inspired by my modest app and made stuff that is much cooler.