'Override delete method to update parent forum info.'

def delete(self, *args, **kwargs):

    forum = Forum.objects.get(pk=self.forum.id)
    if (forum.last_post and (forum.last_post.thread_id == self.id)):
        forum.update_last_post(exclude_thread=self)
        forum.save()
    super(Thread, self).delete(*args, **kwargs)
