Mercurial > public > sg101
diff antispam/utils.py @ 789:9e803323a0d0
Removing AUTH_PROFILE_MODULE and get_profile().
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 23 May 2014 15:10:11 -0500 |
parents | feafa1c3d356 |
children |
line wrap: on
line diff
--- a/antispam/utils.py Sun May 18 17:43:37 2014 -0500 +++ b/antispam/utils.py Fri May 23 15:10:11 2014 -0500 @@ -36,7 +36,7 @@ user profile. """ user = request.user - if user.get_profile().is_stranger() and contains_spam(content): + if user.profile.is_stranger() and contains_spam(content): ip = request.META.get('REMOTE_ADDR', "unknown") @@ -60,7 +60,7 @@ """This function marks the user as suspended.""" user.is_active = False user.save() - profile = user.get_profile() + profile = user.profile profile.status = STA_SUSPENDED profile.status_date = datetime.datetime.now() profile.save(content_update=False) @@ -77,7 +77,7 @@ user.is_active = False user.save() - profile = user.get_profile() + profile = user.profile profile.status = STA_SPAMMER profile.status_date = datetime.datetime.now() profile.reset()