diff gpp/bio/admin.py @ 348:d1b11096595b

Fix #168; when nailing a spammer, clear their profile text fields. Guard against topics and forums that don't exist when deleting posts in the signal handler. Make the forum stats template tag only display the latest active users.
author Brian Neal <bgneal@gmail.com>
date Wed, 02 Mar 2011 02:18:28 +0000
parents 69d0306a6fe7
children 9d470c7a2b93
line wrap: on
line diff
--- a/gpp/bio/admin.py	Wed Mar 02 01:11:32 2011 +0000
+++ b/gpp/bio/admin.py	Wed Mar 02 02:18:28 2011 +0000
@@ -98,6 +98,12 @@
         for profile in qs:
             Comment.objects.filter(user=profile.user).delete()
             delete_user_posts(profile.user)
+            profile.location = ''
+            profile.occupation = ''
+            profile.interests = ''
+            profile.profile_text = ''
+            profile.signature = ''
+            profile.save()
     mark_spammer.short_description = "Mark selected users as spammers"
 
     def mark_stranger(self, request, qs):