Category Archives: Web Design

Exactly what it says on the tin. I do a fair bit of it, both for pleasure and for profit.

Google Sites first impressions

In a month where pleasingly many things got crossed off my long-term To Do list, the St Columba’s website was happily no exception. Like so many church and charity websites I’ve run over the years (the eight years since I was sixteen, in fact!), it was a pile of static content which meant I was stuck maintaining it and those producing the content couldn’t easily chip in.

So, what to do? I could spend several weekends hacking together a CMS in Django – actually, no I couldn’t, on the evidence of failing to have found time for that in three years – or I could use somebody else’s second-rate pile of PHP. What I really wanted was a system which removed all dependency on my servers, cost nothing and was reasonably easy for non-techies to be carefully steered into using.

Google Sites was suggested by Tony, and since we already had Google Apps set up for the domain in question, it seemed like a good place to start, with a reasonable chance of being a long-term solution.

I started by sitting down for a few hours and dumping what content was worth keeping from the old site. Here’s an assortment of things I noticed:

  • All our outgoing hyperlinks were mangled by Google Sites to bounce via a URL of the form<our actual link>. As well as looking ugly, this is a particular pain in the neck for users on mobile connections, since the high latency makes the extra redirection from Google’s URL to the real one painfully obvious. I’ve no idea why this happened, but it went away after a couple of hours, so that’s OK
  • In order to avoid having tedious stuff about comments and attachments at the bottom of every page, you need to make a template with those options turned off, and base your pages on it. And if you’ve made 80 pages before discovering that, you need to fix each one by hand on the page settings box for it. Sigh.
  • On a more positive note, the integration with Google Calendar,Google Groups signup, and Google Docs is top notch as you might expect.
  • The CMS seems pretty capable – my not-especially-techie co-conspirator was able to bash out most of the design and not make it look too bad, and the page editing tools are simple enough for non-technical users.

The Google Site backed site is now live, and I’ll post more later on smoothing off some of the rough edges.

Model inheritance in Django

a.k.a. “How to query for all objects not in a given subclass”

I ran across this problem today – do please leave a comment if you know of a better way to solve it than what follows.

You have two Django models, one of which inherits from the other, e.g.:

class Order(models.Model):
    # some fields

class DiningOrder(Order):
    # some more fields

So, how do I write a query (using the Django ORM) which returns all the Orders which are not DiningOrders?

Apparently, this does the trick:

>>> Order.objects.all().count()
>>> DiningOrder.objects.all().count()
>>> Order.objects.exclude(id__in=[ for d in DiningOrder.objects.all()]).count()

Introducing Bogroll: a stateless RSS reader

My main problem with RSS readers is that if I go away for a few days and come back, I don’t really have time to catch up with all the posts which came up whilst I was away. What I needed, therefore, was a stateless reader which would just show the newest 10 entries or so.

Add in category filtering and a web interface – such as it is – and you get Bogroll, which I’ve just released under the GPL. You can grab the 0.1 release, check out the code from subversion, and have a nosey at my installation.

Incidentally, if anyone can think of a better name for it, do get in touch.

Asirra, and the end of another term

Spam. It’s not going away, and nor is my increasing annoyance at some of the things we need to do to avoid it. Like making a separate email forwarder for every service I sign up to. Or, like CAPTCHAs. I can see exactly why we need them, but deciphering squiggly letters against a low-contrast background isn’t easy on the eyes. I was intrigued to see a possible alternative solution called Asirra, which Microsoft Research have come up with. Who knows, I might give it a try myself to keep the bots away from my comments section – although Bad Behavior seems to be doing a good job at the moment.

In other news, I appear to have reached the end of another Oxford term with my sanity intact. The first six weeks were great, it just got a bit wearing for the last two. Some of the non-academic stuff, sadly, is going to have to take a back seat after Christmas, but ah well.

Redesigned again, new toys and multiple monitors

So, as those not reading via one of the planets will be aware, I’ve rolled out the fourth (or is it fifth?) new theme for this site since May 2007. I’m definitely more pleased with this one than any of its predecessors, and intend to stick with it for a good while.

In other news, I blew £160 on new technology for my desk this week: specifically, a new 4GB USB pendrive to replace my ailing 256mb one, a 250GB external hard disk for my backups, and best of all, a 19 inch TFT monitor to act as a second screen for my laptop.

All of the above were very reasonably priced over at Dabs, and the £100 inc delivery cost of the monitor in particular came as a very pleasant surprise.

This is the first time I’ve given multiple monitors a serious go under Linux (specifically Kubuntu), and KDE certainly puts Windows (at least up to and including XP) into the shade here: a taskbar on each monitor? Yes, it can do that. Separate background images per monitor (without silly hacks involving stitching image files together)? Yes. Only show the buttons for the windows on this monitor on this monitor’s taskbar? Certainly, sir.

It’s only been two days, but I’m already wondering how I ever managed without a secondary screen. It certainly made finishing the new theme for this site a lot easier.

Two days of CSS

So, I’ve spent the last 48 hours writing a couple of style sheets.

The first one, as the regular readers amongst you will notice, was for this site (apologies to those of you reading this on Planet CompSoc, you’ll have to click through to see what I’m on about). I’ve gone for a minimalist black-and-white look. I’m not entirely happy with it, but I’ll keep tweaking…

The second, still very much in progress, is for the Magdalen College JCR site, which I’m giving a comprehensive makeover this summer. Feel free to leave a comment on either – constructive criticism is always welcome.


Apologies to anyone who visited this site at about 20.40 BST on 27/06/2007 and wondered what the heck had happened to the new theme this post mentioned. Suffice to say that the correct way to fiddle with WordPress is to start in the backend manager, not to do random find-and-replaces across the underlying code. Don’t try and rename the directory the current theme lives in, either.

Up and running

So, after a few weeks of holding pages and messing around, my site is now up, and it’s here to stay. The default WordPress theme certainly isn’t; chances are I won’t have time to make a nice new one until the end of June, though. As some of you may have seen, I had a go, but it ended up being not much better than my first ever attempt at web design, so clearly I need to take the time to do it properly. Watch this space…