Mercurial > public > sg101
diff forums/views/spam.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 | ee87ea74d46b |
children | e932f2ecd4a7 |
line wrap: on
line diff
--- a/forums/views/spam.py Sun May 18 17:43:37 2014 -0500 +++ b/forums/views/spam.py Fri May 23 15:10:11 2014 -0500 @@ -29,7 +29,7 @@ def promote_stranger(user): """This function upgrades the user from stranger status to a regular user. """ - profile = user.get_profile() + profile = user.profile if user.is_active and profile.status == bio.models.STA_STRANGER: profile.status = bio.models.STA_ACTIVE profile.status_date = datetime.datetime.now() @@ -42,7 +42,7 @@ post = get_object_or_404(Post.objects.select_related(), pk=post_id) poster = post.user - poster_profile = poster.get_profile() + poster_profile = poster.profile can_moderate = perms.can_moderate(post.topic.forum, request.user) can_deactivate = (poster_profile.status == bio.models.STA_STRANGER and not @@ -80,7 +80,7 @@ deactivated. """ user = get_object_or_404(User, pk=spammer_id) - profile = user.get_profile() + profile = user.profile success = not user.is_active and profile.status == bio.models.STA_SPAMMER @@ -98,7 +98,7 @@ """ post = get_object_or_404(Post.objects.select_related(), pk=post_id) poster = post.user - poster_profile = poster.get_profile() + poster_profile = poster.profile can_moderate = perms.can_moderate(post.topic.forum, request.user) can_promote = poster_profile.status == bio.models.STA_STRANGER