Defying Classification

by Malcolm Tredinnick

Topic: software/django

Fri 25 Apr 2008

An Interview

Posted at 15:55 +1000

Seems to be my week to be interviewed. Shabda Raaj interviewed me over IM earlier this week about Django and Open Source in general. It's been published at The 42 Topics Blog.

Topics: software/django, software/open source

Tue 22 Apr 2008

Software Internationalisation

Posted at 23:19 +1000

Michael Trier and Brian Rosner released another episode of This Week In Django and I was asked to play the role of guest speaker. The focus was on internalisation in Django (and in general in software).

I realised after we recorded it that I neglected to mention a few things that are probably of note for developers trying to write international software. Consequently, here's a small follow-up with some additional things I thought of last night.

This isn't entirely Django-specific, since most of these techniques apply to software in general.

(Read more...)

Topics: software/django, software/internationalisation

Wed 26 Mar 2008

More Django Queryset Notes

Posted at 21:44 +1100 (edited 23:35)

Following on from some positive feedback to my recent post about writing portions of the ORM layer in Django, I'm encouraged to do another post about one particular implementation detail that took some time to puzzle through.

Sorry, general non-technical readers. This is another heavy Python post. Sorry, technical readers. This is another "how Malcolm thinks" post. It's not pretty. The good news is, there's no SQL in this post.

(Read more...)

Topics: software/design, software/django

Tue 18 Mar 2008

Rusty Explains Good API Design

Posted at 17:47 +1100

Too busy to write any long blog posts at the moment. Far too busy to write shorter ones.

Instead, a quick follow-up to my recent posting about Rusty Russell's API design levels. Rusty has now started with the first in what he promises will be a series about good API design.

I'm taking the hard line on a few API design decisions in Django at the moment for reasons I've learnt from people like this. More about that in a future post. In the meantime, people should learn this stuff.

Topics: software/design, software/django

Tue 11 Mar 2008

Queryset Implementation

Posted at 23:49 +1100

I haven't done a Django-related post in a while. Mostly because I've been a bit depressed by the whole thing lately for various reasons and writing tutorials isn't going to fix that. So, instead, here's a bit of a brain-dump of stuff I've been working on.

(Read more...)

Topics: software/design, software/django

Fri 15 Feb 2008

Preparing For The Next Django Sprint

Posted at 23:59 +1100

In a little over four weeks (17 March in the US), Django will have another one of our code sprints. The 'main event' will be in Chicago, USA, where a bunch of people will be taking advantage of the post-PyCon sprint sessions for three days. However, as always, remote participation is possible and encouraged.

Somebody recently asked on django-users what they could to prepare for the sprint, since this was going to be their first time. Jacob has promised to give an introductory tutorial on the day in Chicago, which will help those present in person. For others, here are my thoughts on how to prepare (and why now isn't too early to start if you want to get some real work done).

(Read more...)

Topics: software/django

Tue 12 Feb 2008

Django Tip: Application-level context processors

Posted at 14:53 +1100

Whilst going through my feed reading this morning, I read the application-level context processors were not possible. This came as a bit of a shock, since I've been using them for a while now. :-)

It's not hard and there's an interesting conclusion to be drawn about the power of scoping rules (plus a reprise on my thoughts on why putting everything under the sun into a framework isn't a great idea).

(Read more...)

Topics: software/django/tips

Sun 6 Jan 2008

Django Tip: Complex Forms

Posted at 13:39 +1100

On the Django mailing list, we periodically see requests for help by somebody trying to create a semi-complex form of some description. Often, getting a second perspective is a good choice because the original poster was overlooking a possibly easier alternate approach.

Today, I want to fill in one of the gaps. Something that is really easy once you know the machinery and possibly not so obvious until you sweat it out once: putting multiple repetitive sections into a single form.

(Read more...)

Topics: software/django/tips

Wed 14 Nov 2007

Django Tips: Source Code Filenames

Posted at 22:58 +1100

Following on from last week's post about writing code that isn't tied to a project structure in Django, here are a couple of other quick thoughts about file naming and layout.

(Apologies to the half dozen or so people who read this blog for the "anything but Django" content. I've been spending all my free time in the last week working on Django, so it's buzzing around in my head at the moment.)

(Read more...)

Topics: software/django/tips

Sun 11 Nov 2007

Django Tip: External Database Backends

Posted at 20:26 +1100

I was going to write a longer Django entry today about WSGI, but I've been spending time working on Django code instead, so a here's something shorter and possibly less useful that deserves some attention from Django users.

Every now and again, somebody has a need to change the behaviour in Django's existing database backends. Or they want to develop a new backed for, say, Firebird or Microsoft's SQL-Server or something. A couple of months ago (in revision 6316), George Vilches contributed a patch that gave Django the ability to import external database backends.

(Read more...)

Topics: software/django/tips