class ChatLine(models.Model):
    screenname = model.ChatField(max_length=40)
value = models.CharField(max_length=100)
created = models.DateTimeField(default=datetime.now())
url('^api/latest-chat/(?P<seconds_old>\\d+)/$', get_latest_chat),

def get_latest_chat(request, seconds_old):
    chat_since = datetime.datetime.now() - datetime.timedelta(seconds=
        seconds_old)
chat = Chat.objects.filter(created__gte=comments_since)
return HttpResponse(simplejson.dumps(chat), mimetype='application/json')
DJANGO : Update div with AJAX