So, life has been eventful lately. There was DjangoCon, which was awesome even though I came away deeply unhappy with how my talk turned out; due to a lot of hectic things going on, it fell far below the standard I usually like to enforce for myself. I’ve got a couple things cooking for PyCon, though, which will hopefully make up for it. Things are starting to ramp up for the Django 1.2 development cycle, which is looking to be chock full of awesomeness. There’s quite a ...
So, the repository for the second edition of Practical Django Projects is not yet done, but due to the general clamor I’m opening up public access; you can browse it, or check out a copy of the code, from its page on Bitbucket. You’ll probably want to have a look over the README file displayed on that page, since it provides helpful information on how the repository works.
Right now the first three chapters’ worth of code (covering the first project in the book — a very simple content-management ...
So just after lunch today a box arrived, containing copies of the second edition of Practical Django Projects, which went through final editing about a month ago (Apress tends to be pretty quick at getting the book printed and shipping). Since I assume that means other people will be getting copies of the book soon, I’d like to cover a couple important bits of information.
First of all, the second edition (as the cover proudly declares) covers Django 1.1. Which hasn’t yet released. There are three actual ...
So this afternoon I took a little break from running unit tests to head to the store and pick up a couple things. When I got back, I noticed I was no longer on IRC, and my client was reporting it couldn’t connect to the bouncer I run to stay online. I tried to SSH in to see if the bouncer had died, and discovered I couldn’t connect.
And couldn’t ping the box.
And couldn’t get this site to come up in a browser.
This site ...
Adrian announced today that he’s working on revising The Definitive Guide to Django to produce a second edition that covers Django 1.0, which is awesome news for anyone who’s used the book as a guide to learning Django.
In the same vein, I’d like to announce something that’s been unofficially mentioned a couple times but never fully clarified: I’m busy working on the second edition of Practical Django Projects, which will also cover Django 1.0 (and maybe a feature or two from Django ...
Doug Hellmann has brought a meme to my attention, and I’d be remiss in my duties if I didn’t act upon it.
Here’s how it’s supposed to work. Save a copy of this Python script, say as a file named oldest.py:
#!/usr/bin/env python """Print last-modified times of files beneath '.', oldest first.""" import os, os.path, time paths = ( os.path.join(b,f) for (b,ds,fs) in os.walk('.') for f in fs ) for mtime, path in sorted( (os.lstat(p).st_mtime, p ...
I’m sitting here in Building 40 at Google, waiting for this morning’s first DjangoCon keynote to start, and getting ready for the Django technical design panel which comes immediately afterward. Naturally, I’m taking advantage of the down time (and Google’s bandwidth) to upload my slides from yesterday’s talk. If you’ve seen/read the slides from the version of this talk I gave at PyCon, I can tell you that there are now 40% more slides and they’re all new material.
And, of course ...
So, as I let the dust settle from the most controversial changes I made in the redesign (and tweak some things and watch my stats in response to the constructive feedback I’ve gotten), I’d like to address the other big change that people have been asking about: why I switched (switched back, actually) from XHTML 1.0 to HTML 4.01.
The short and sweet reason is simply this: XHTML offers no compelling advantage — to me — over HTML, but even if it did it would also offer increased ...
Back in March when I read about Ryan Tomayko’s redesign, I had two immediate reactions:
Of course, at the time I was busy working on a book and so couldn’t really spare much effort for doing redesign work. Once that was in its final stages, though, I sat down and started thinking about what I could do to reduce the amount of cruft hanging around my weblog. Many revisions later, I have something I’m close to being ...
Following up on last weekend’s housekeeping announcement: hopefully you’re noticing that things look a little different around here. There’s a lot going on, and a lot to write about (expect that in coming days), but in summary:
On a recent plane ride, I was watching an episode of The West Wing which had flashbacks to the original campaign which set up the Presidency on which the show is based. There’s a scene in that episode where Abbey Bartlet — the eventual First Lady on the show — is talking to some of her husband’s campaign staffers about whether her husband is ready to really run the campaign and be President. The dialogue is classic:
JOSH: Well, is he going to be ready?
ABBEY: You bet your ass ...
A minor heads-up: going to be doing a little maintenance this weekend, which means that this site will be seeing some downtime as I upgrade a few things. I’ll most likely just turn things off for a bit while that’s running, but you may occasionally see an error page if I forget or if I manage to screw up.
Everything should be back to normal by Monday.
Just a quick note: I’ve bumped django-registration to version 0.5. New in this version are Italian and Serbian translations, registration at the Cheese Shop (so you can now do easy_install django-registration) and a few bugfixes.
Notes you might care about:
register view will pass any uploaded files from request.FILES to the registration form.
A few notes about the book:
I just finished reviewing and annotating the index for the book, and sent it back. And with that, I believe it’s finally done; soon it’ll be in the hands of the printer, and sometime hopefully next month you’ll be able to visit your local bookstore and pick up a copy.
My immediate plans include flying back east tomorrow to watch a couple of dear friends get married, and hopefully spending the next few days without interacting with any computers in any way.
After that… I’ve got ...
As a general rule, the things I write fall into two categories: long-form (for the medium of blogging, that is; the book is “long” in a very different sense), in-depth pieces which tend to be either tutorials on various aspects of working with Django or op-ed bits on web development and the Web in general, and short-form tidbits which mostly consist of a thought or two. Typically I never post the latter, because it always feels like a waste: if I could give it a more thorough treatment, I’ll ...
For a while now I’ve been really disappointed with the state of web stats.
When I moved over to my shiny new server back in September of last year, I ditched Mint because it requires PHP and MySQL, neither of which will ever, under any circumstances, be allowed on my box. So I started fishing around for something else; most other host-it-yourself stats packages were, frankly, crap either in terms of what they tracked or the interface they presented it in, which led me to look for a hosted ...
I gave a quick talk at the Django open session last night, and I’ll be giving it again here in a few minutes as a proper lightning talk, briefly walking through the process of some of the database-backed journalism projects we do at the Journal-World (specifically this feature on crime reports at the local university campus).
Slides are already online. If you’re at PyCon and want to hear the talk, come to the ballroom.
I just finished my talk, which apparently included a bonus live transcript on IRC by Justin Lilly, and I think it went pretty well considering how much ground it had to cover and how nervous I was up until the moment when I started talking.
If you aren’t at PyCon, or if you are but didn’t come to the talk, or if you just want to download them and mash them up, my slides are online:
Since it includes several CC-licensed photos, and since I ...
My flight arrived in Chicago a while ago, and despite an attempt by the hotel to screw it up, I’m currently sitting in my room enjoying a beer before bed. Here’s my plan for the next few days:
Outside of these predictable time slots, I’ll probably be all over the ...
Recently I received an email from a company that’s in the online advertising business; they run a network that places targeted ads on a collection of sites, and wanted to know if I’d be interested in running them here. I just finished writing a reply and, since I’ve gotten a couple such offers in the recent past, I figured it’s probably time to make a public statement of my policy toward ads on sites that I personally manage. It’s very simple:
I don’t run ...
Between normal work, working on the book, working on my upcoming PyCon talk and working on a couple little things on the side, I haven’t had much time for blogging lately, especially about Django. But I’ve built up a collection of little things that need to get posted, so I’m just going to start dumping them out here and then get back to not having any free time :)
django-registration updateI’ve bumped django-registration up to version 0.4p2; the new package doesn’t add any ...
As of sometime this weekend when the DNS change propagated, all static/media files for this site migrated over to Amazon’s S3 storage service; when I relaunched back in September, media was coming off a Joyent BingoDisk account. While a change in media serving technology really isn’t all that sexy or exciting compared to some aspects of web development (or as popular as writing about whatever Microsoft is doing today), I’d like to take a moment to talk about this move, why I decided to go with ...
So, let me straighten a few things out.
First off, this is my personal blog. What you see here is me speaking my own personal mind, and I neither represent nor want to represent anything larger: not Django, not Python web development, not my employer, not anything except me and whatever I feel like writing about. This is an important point to keep in mind, because I don’t have any claim to represent anything else:
First off, if you’re going to PyCon (Chicago, March 14-16), make some room on your schedule; there are several interesting talks on Django scheduled, including one by yours truly.
The description of my talk on the PyCon site is somewhat pithy on account of space restrictions, but conveys the general idea of what I’ll be talking about; flexible, reusable Django applications are one of my pet topics, and I’ll be covering some techniques and best practices picked up from a couple years of real-world work with and ...
Today marks two releases, both numbered 0.4, of django-registration and template_utils.
The new release of django-registration is largely a matter of policy; there’s no new functionality or features, but there is one backwards-incompatible change: the validation of passwords (verifying that the same password is entered in both fields) has been moved to the clean() method of RegistrationForm, which means that the error message from a password mismatch is now accessed via form.non_field_errors() instead of form.errors[‘password2’]. It’s a relatively easy change to make in your ...
First up, the bad news: my streak of one Django-related post per day in November is going to come to an end tomorrow. Some Thanksgiving plans (technically pre-Thanksgiving by a week, but nothing wrong with celebrating a little early) I’d had which were first on, then off, and are now on again, will be taking me out of town and probably offline from tomorrow morning through Sunday night. I toyed with the idea of putting together four entries and post-dating them to show up at the right times, but ...
This one’s just a quick heads-up, but if you’re following django-registration you’ll want to take note: I’ve been doing a series of minor releases since 0.3, and it’s now up to 0.3p5.
There have been a few bugfixes since 0.3 that you’ll want, and also some important changes:
When Steve Jobs announced the iPod touch at the beginning of the month, I knew I wanted one: it looked like the perfect little device for my assorted mobile needs. I spent a week or so thinking it over, then placed an order, and Friday morning as I was stepping out of the shower a FedEx delivery guy rang my doorbell to deliver it. I’ve spent the last couple of days playing with it, and so far I’m quite happy. What follows are my observations, which may or ...
For those of you who are using/following it, I’ve just pushed out django-registration 0.3. The basic workflow of the application is still the same:
But under the hood quite a few things have been rearranged to make the application cleaner and more extensible, and there have been a couple of backwards-incompatible changes for anyone using an older version. Here’s how it breaks down.
You’ll now need ...
As of yesterday, this site is served from a Joyent Accelerator, running Django via Apache/mod_python backed by a PostgreSQL database. This setup probably isn’t for everybody, but if it’s right for you (and only you can make that call), here’s how I got everything running.
Make sure you’ve taken preliminary steps to secure your Accelerator before you do anything with it; this means things like setting up key-based SSH authentication and turning off password-based login, disabling SSH logins by root, etc.; the ...
If you’re seeing this, congratulations: the DNS changes have propagated and you’re seeing this site, in all its redesigned glory, at its new home: a Joyent Accelerator.
This took quite a bit longer than I’d expected, largely because — while ostensibly working on redesigning the site and re-writing the blog application which powers it — I kept feeling the urge to spin off various bits of functionality into their own generic, standalone applications. Now I’m finally putting all that work to good use, and does it ever feel ...
As you’ve hopefully noticed if you’re following things in the world of Django, the Unicode branch merged today, which means that Django is now safe for Unicode at every level (pending any bugs which need to be fixed). That’s great news for users of Django.
But it also means that developers of Django-based applications need to be aware of how Django handles Unicode and watch out for boundaries between Django and any bits of software which aren’t so enlightened.
Which is where you come in.
Over ...
Way back when I first set up this site, and threw together a minimal blog application to power it, I didn’t bother much with enhancing Django’s comment system. But later on, when I started getting a lot of comment spam (trivia: as of this moment, 15,153 comments have been posted here, and 14,406 of them — roughly 95% — have been spam) I realized I needed to do something, and quickly hacked Django’s comments application to add moderation.
At the time it seemed a reasonable thing to ...
I’ve just packaged up version 0.2 of django-registration; there are two big changes since the initial release which are worth mentioning (and which are, of course, covered in the documentation supplied with the download):
key_generated field was removed from the RegistrationProfile model, so you’ll want to drop the corresponding column in your database if you upgrade.
Also, a few bug fixes and minor enhancements went ...
Back when I first launched this site (about a year ago now), I mentioned that I’d someday release the blog application I’d written to power it. So far I’ve been held up by two large problems:
In the course of working on a couple personal projects (which will be released eventually), I found myself factoring out a lot of common code and making it more and more generic, until one day I realized I had a whole separate application just waiting to be documented and bundled.
So here it is: template_utils, a collection of generic and useful tags, filters and other tools related to Django templates. Full documentation is on the project wiki at Google Code, and distributed with the download.
Even though I’m using ...
When I went to PyCon back in February, I made a silly travel mistake: I forgot to bring a razor with me, and so I didn’t shave while I was there. When I got back my face was kind of scruffy, but I’d never grown a beard before and I’ve always hated shaving, so I decided to let it grow, and grow it did. At my last haircut, a couple weeks ago, I got it trimmed and got some advice on beard care; I knew it was ...
Jeff is on a mission to find view functions and template tags in our software which don’t have useful docstrings (and hence don’t have useful auto-generated documentation in the Django admin). The result (copied from IRC):
<jcroft> congratulations to ubernostrum: weblogs wins the award for the most well-documented Ellington app
<jcroft> which is especially impressive, given that it’s also the one with a fuck lot more views than any other
Jeff diplomatically declined to publicly shame the author of the worst-documented Ellington application…
Just in case you’re not subscribed to the Django mailing lists and/or aren’t at PyCon, today I launched a little side project I’ve been working on: djangosnippets.org, a site for Django users to share useful bits of code.
There are still a few things I’m working out (like feeds), but on the whole I’m pretty happy with it :)
So, I’m in Dallas, eagerly awaiting the beginning of the non-tutorial bits of PyCon 2007; I got here around 4:15PM (after a lovely flight where I was inadvertently bumped to first-class), and already things are rocking; I just got back from dinner and drinks with some folks who are doing really cool stuff with and to Django. Already got some interesting ideas and things to continue fleshing out, and I’ve got another four days to spend here.
If anyone’s looking for me, I’m lounging in ...
Ever since I started using Joe Gregorio’s mimeparse module to help with my OpenID delegation, I’ve been treated to a first-hand tour of the various things people have thought it would be good to stuff into the HTTP Accept headers their applications send. So, naturally, I’m going to start a gallery of some of my favorites.
So far the winner in the “is that really what you meant” category is what appears to be the default header sent by Java’s HTTP connection classes:
text/html, image ...
There’s been lots and lots and lots of buzz around OpenID in the last couple weeks, which makes me happy because OpenID is a pretty darned cool system. Simon is doing all sorts of cool things, and Sam Ruby wrote up wonderful step-by-step instructions for OpenID delegation, which lets you use your own domain name to sign in with OpenID even if your OpenID is hosted somewhere else.
I sat down tonight and worked out how to set it up here, because that’s a nifty and useful trick ...
It’s Christmas Eve and I’m sitting at home with my family, and the most appropriate thing I can think of to do is to quote William Makepeace Thackeray:
My song, save this, is little worth;
I lay the weary pen aside,
And wish you health, and love, and mirth,
As fits the solemn Christmas-tide.
As fits the holy Christmas birth,
Be this, good friends, our carol still:
Be peace on earth, be peace on earth,
To men of gentle will.
Merry everything.
I know I haven’t been writing much lately, and that I haven’t been keeping up with useful Django articles as much as I should be, but there are reasons for that.
So I’m going to change course a little bit and focus on some non-Django stuff for a little while. I’ve got a backlog of miscellaneous things I’ve been writing and rewriting and I’d like to get them out the door; plus, between holidays, work, significant Django changes (mostly having to do with newforms ...
Looking through my stats today, I found an incoming link from a blog written entirely in Chinese. Now, I don’t read Chinese (I know about half a dozen words of Mandarin, but couldn’t begin to pronounce them with the right tones), so I ran it through Babelfish and found that this person was — apparently — commenting on how “comforting” my site was to him.
This left me somewhat befuddled, until I went back and looked at the comment he’d left here, and then at his screenshot of, sure ...
So it seems that something’s broken somewhere in all the hacks I do to the comment system, because every attempt to submit a comment is now met with AkismetError: missing required argument.
I’m working on it.
Update: commenting still won’t work, but apparently I’m not the only person running into this bug. I can’t find any notes regarding changes to the Akismet API, but that feels like the most obvious reason why this is suddenly happening.
Updated again: and just like that, things are working ...
I’m not a formally-trained programmer. I wasn’t a computer science major in college (my degree is in philosophy), and my first job after graduation didn’t involve programming (it was phone-based customer service at a health-insurance company). But here I am, developing software for a living.
I’ve never written a compiler. I’ve never hand-tuned something by dropping in bits of assembly, or even by writing C extensions for an interpreted language. I’m too young to have ever hacked on a Lisp Machine. But here I ...
If you’re a regular reader of my blog it will be purely remedial reading, but an article I wrote about Django is up at Sitepoint as of this morning.
Go forth and spread the good word.
A long time ago, in a land far away, there lived people who were called “carpenters”, and their jobs consisted, in part, of the following tasks:
Now, the last one was particularly problematic, because it usually involved pounding a small metal connector — called a “nail” — through one of the pieces of wood and into another. Many carpenters working in small shops had to ...
One of these days, someone should start a socially-based translation service for blogs.
You see, it’s not uncommon, this being the World Wide Web, to get incoming links from articles written in languages you don’t necessarily speak; for example, my recent post about accessibility got attention from a German-language blog and, sadly, I don’t understand more than a few words of the language (I also got linked up by a French-language blog, but I can get by in French).
So a pretty cool service might work like ...
Following up on yesterday’s feed subscription housecleaning, today I noticed that, if you buy a NewsFire license before day’s end you’ll get a nice bonus: Inquisitor thrown in free of charge.
Well, hot damn!
Inquisitor is really the big win for me here; I’m trying to get into the habit of using Safari as my day-to-day browser, since I’m doing lots of JavaScript stuff and — though this is in no way a knock against Dave Hyatt and the WebKit team, or the KHTML team — I ...
It had gotten out of hand and out of control. It was impossible to deal with, and impossible to do without. It was eating more and more of my time every day, and finally I just had to kick it to the curb.
That’s right, I’m talking about my feed subscription list.

It took about half an hour, but I’ve successfully pruned and reorganized my subscription list; where before the subscriptions pane in NNW Lite was a sprawling single list of pretty much ...
Assuming they’re both still on TV in 2008, Jon Stewart and Stephen Colbert will both run for President. In different parties.
If, as I do, you use pydelicious to handle automatically posting links to del.icio.us, you’ll want to take note of the fact that the switch of the del.icio.us API‘s location, previously announced, has happened.
It doesn’t look like pydelicious has updated (and given the spamfest that is their Trac, I wonder if it’s being maintained), so in the meantime here’s the quick fix:
Crack open pydelicious.py, and change lines 91 and 94 to reflect the new API locations; line 91 ...
I don’t honestly expect any of you to remember this, but some time ago, when I posted an entry talking about Python and Ruby (on which comments are closed because the post is over a month old — hopefully this weekend I’ll get around to turning on the auto-moderation stuff I wrote up), I received a comment from one “Mandy Owens”, who seemed to think that, for both technical and marketing reasons, Rails makes Ruby the better choice.
I replied and disagreed with several of her points, because I ...
So. That whole May 1 reboot thing? Yeah, it didn’t happen. But that’s OK, because the extra time let me get a little better run up to launching. But here I am, and here I’ll stay.
As anyone who knows me should expect, I’m now very happily powered by Django; developing the blogging app that’s behind this site was a lot of fun, and a whole lot easier than writing a blogging app has any right to be. I’ll write that up sometime in ...