Mercurial > public > sg101
comparison antispam/utils.py @ 606:c8b4dfb2d1e5
When deactivating spammers, delete their avatar. BB issue #13.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 24 Jul 2012 18:48:35 -0500 |
parents | ee87ea74d46b |
children | 8ddd6490cbc9 |
comparison
equal
deleted
inserted
replaced
605:a7968613c469 | 606:c8b4dfb2d1e5 |
---|---|
78 | 78 |
79 profile = user.get_profile() | 79 profile = user.get_profile() |
80 profile.status = STA_SPAMMER | 80 profile.status = STA_SPAMMER |
81 profile.status_date = datetime.datetime.now() | 81 profile.status_date = datetime.datetime.now() |
82 profile.reset_text_fields() | 82 profile.reset_text_fields() |
83 profile.avatar.delete(save=False) | |
83 profile.save() | 84 profile.save() |
84 | 85 |
85 Comment.objects.filter(user=user).delete() | 86 Comment.objects.filter(user=user).delete() |
86 delete_user_posts(user) | 87 delete_user_posts(user) |
87 | 88 |