Mercurial > public > sg101
diff gpp/forums/tools.py @ 285:8fd4984d5c3b
This is a first rough commit for #95, adding the ability to embed YouTube videos in forum posts. Some more polish and testing needs to happen at this point. I wanted to get all these changes off my hard drive and into the repository.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 14 Oct 2010 02:39:35 +0000 |
parents | d77e0dc772ad |
children | 767cedc7d12a |
line wrap: on
line diff
--- a/gpp/forums/tools.py Mon Oct 04 01:01:29 2010 +0000 +++ b/gpp/forums/tools.py Thu Oct 14 02:39:35 2010 +0000 @@ -15,6 +15,10 @@ """ posts = Post.objects.filter(user=user).select_related() + # delete attachments + for post in posts: + post.attachments.clear() + # build a set of topics and forums affected by the post deletions topics = set(post.topic for post in posts)