Mercurial > public > sg101
diff gpp/forums/views/spam.py @ 363:9d470c7a2b93
Following up on #168; redo some code to make it more DRY. Added a function on the profile to reset the text fields.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 Mar 2011 04:03:30 +0000 |
parents | d1b11096595b |
children | 2ff5f4c1476d |
line wrap: on
line diff
--- a/gpp/forums/views/spam.py Sat Mar 05 03:43:32 2011 +0000 +++ b/gpp/forums/views/spam.py Sat Mar 05 04:03:30 2011 +0000 @@ -37,11 +37,7 @@ profile = user.get_profile() profile.status = bio.models.STA_SPAMMER profile.status_date = datetime.datetime.now() - profile.location = '' - profile.occupation = '' - profile.interests = '' - profile.profile_text = '' - profile.signature = '' + profile.reset_text_fields() profile.save() Comment.objects.filter(user=user).delete()