August 12, 2008

Holden Web on Django Trunk Again

The main site is fairly simple, so I figured it would be a short job to migrate it to the latest version of the Django trunk (r8301 when I started). While I felt it was unlikely I'd unearth any errors it's the least I can do to help the developers as they charge towards the first release candidate for 1.0.

It turned out to be relatively simple, but with an unanticipated glitch. Having made what I thought were all necessary changes, most of which simply involved altering

from django import newforms as forms


from django import forms

I tried accessing the site and got a lengthy traceback terminating in
ImproperlyConfigured: Error while importing URLconf 'urls': cannot import name newforms
This would have been fine, except that the traceback didn't actually give me any information about the module that was causing the problem. Ultimately I traced it to the registration add-on, which needed the same change making to it as did my own code.

I'm pretty impressed, even on a small site, that such large changes to the code needed such small changes to my application before it worked. Kudos for code quality to the Django developers. But it would be nice if the error message could be more informative.

No comments: