diff --git a/boards/models.py b/boards/models.py --- a/boards/models.py +++ b/boards/models.py @@ -66,6 +66,13 @@ class PostManager(models.Manager): def delete_post(self, post): if post.replies.count() > 0: map(self.delete_post, post.replies.all()) + + # Update thread's last edit time (used as cache key) + thread = post.thread + if thread: + thread.last_edit_time = timezone.now() + thread.save() + post.delete() def delete_posts_by_ip(self, ip):