Q:

Adding a "status light" to Django admin

I am running a set of kiosks that each display content from my Django app.  Each kiosk pings a url like myurl.com/location=downtown every minute to see if there are any updates.  
My models.py looks something like this.  Every time the model is pinged, the last_updated is updated.
class Location(models.Model):
    name = models.CharField(max_length=20)
    last_update = models.DateTimeField()

Unfortunately, every so often, the browser in the kiosk crashes.  What I am looking to do is add to the front of the admin interface, after I log in, a little green or red light to indicate if it has been more than 5 minutes since one of the locations had been updated.  
Is this the best way to go about making a heart beat for the application?  How do I modify the admin interface to give me the status lights to see if the kiosks are ok?

A:

Oops, I typed up the following before re-reading the question. So, if you would like to have a custom column on the list display for Location, do the following. Otherwise, look at @jpic's answer.
--
Yep, you can define custom Admin columns with a method on a ModelAdmin like so:
import datetime
from django.contrib import admin
from my_app.models import Location

class LocationAdmin(admin.ModelAdmin):
    list_display = ('name', 'slug', 'custom_column',)

    # define the row x column value here
    def custom_column(self, obj):
        if obj.last_updated < datetime.datetime.now() - datetime.timedelta(minutes=5):
            retval = ('red.jpg', 'This location checked in more than 5 minutes')
        else
            retval = ('green.jpg', 'This location checked in less than 5 minutes ago')
        return "<img src='%s' alt='%s' />" % retval

    # set the column heading here
    custom_column.short_description = 'Status'

# don't forget to register the newly sub-classed ModelAdmin
admin.site.register(Location, LocationAdmin)

The custom method can also be an attribute on the Model itself. For details, see the admin docs.

