Blogging with Django
Entry updated Feb. 13, 2008 at 12:56 p.m.
This morning I implemented the switch from Movable Type to a custom-built Django application for patrickbeeson.com.
There are a number of links I need to redirect; if you find one, just send me an e-mail using the contact form and I'll get it corrected. Also, there are a number of old entries that I chose not to port over because they were no longer relevant or contained little information useful to anyone but myself. I'll provide a link on the archives page to the full export from Movable Type for those that want to sift through those entries.
Please update your feeds to the following URL: http://patrickbeeson.com/feeds/blog/
Also, this site is cached for about 10 minutes which makes for super quick loading but not so quick updating. If you post a comment (and it's not spam) it will be posted in a reasonable amount of time.
Speaking of comments, I chose not to port over comments from my old site because of the complexity in mapping the IDs to the appropriate entry. I might bring over some of the more relevant ones if I can.
Building this site in Django was a great way to learn how the framework works in terms of publishing content. And since Django was born from the loins of the newspaper industry it makes sense to use it for this purpose.
I had already experimented with building sites in Django a few months ago, but never got very far due to my skittishness with databases. I'm now more comfortable going through MySQL -- at least using the GUI -- and few confident in the data that I'm managing.
Though I am familiar with Django's templating language, especially since diagnosing template issues is part of my job as project manager at Scripps, there were a number of instances were I could do something easily in Movable Type, but not inherently in Django. Things like displaying all of the tags or months on the homepage required writing custom template tags that interfaced with the models.
Also, modifying existing templates to solve an issue is one thing, but building an entire site is another. I stumbled a number of times in the process.
I'm now confident in my templating abilities however. I absolutely love the control I have over every aspect of the markup -- something I didn't always have in Movable Type or WordPress. I estimate I've reduced my CSS and markup by many lines of code. Also, I've completely eliminated all use of JavaScript on the site for the time being thanks to some great Django apps such as template_utils.
Though I've said it before, Django is probably not the best thing to use for blogging. There are many great off-the-shelf applications that do blogging, and do it well. Rebuilding those apps in Django would be a task.
But if you want to learn the framework for either your job or your own personal satisfaction, building a basic blog and other simple publishing applications is a great way to learn.
Here are some other resources I'd recommend:
- The Django Book
- Django documentation
- Django Users Google Group
- Django Snippets
- Django Basic Apps Code
- Source code for Djangoproject
And if you're wondering about the color change from pink to green, well, it's partly inspired by the Django green, but also I found these colors on a wine bottle in a Knoxville, TN shop and thought they looked nice.

Four comments
What are you using for tagging? I've been meaning to get around to adding tagging to my blog and keep putting it off.
@rev_matt_y
I'm actually using a tag class I wrote for my blog app. It's a basic ManyToMany field that collects the tag slug, title and description.
If you want something more extensible, I'd suggest the Django Tagging app.
Congrats on using Django for blogging. I've been working on this myself for months now. But I always seem to run into something that holds me back from taking it live. I know the Django Tagging app stopped working a while back after some changes to Django core and it seems that Jacob never updated the Django Tagging app to work with newer releases of Django. Meanwhile, I just updated to the newest release of WordPress and I'll continue using that until the day comes when I can finally go live with my Django blogging app.
@Jeff
Thanks for the comment!
I went back and forth a few times between keeping with a standard blogging CMS, and rolling my own in Django. But after a number of crashes with upgrading Movable Type, I decided to make the switch.
I too experimented with the Django Tagging app, but decided I didn't need anything of that degree. My personal tagging app is good enough, and easy to use.
Comments no longer accepted for this entry.
To prevent spam, comments are no longer allowed after 60 days.