comparison forums/tools.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 b6d6c9e37fae
children c6c3ba5cf6eb
comparison
equal deleted inserted replaced
788:84aa49497718 789:9e803323a0d0
116 """ 116 """
117 Given a newly created post, perform an auto-favorite action if the post 117 Given a newly created post, perform an auto-favorite action if the post
118 creator has that option set in their profile. 118 creator has that option set in their profile.
119 119
120 """ 120 """
121 profile = post.user.get_profile() 121 profile = post.user.profile
122 if profile.auto_favorite: 122 if profile.auto_favorite:
123 post.topic.bookmarkers.add(post.user) 123 post.topic.bookmarkers.add(post.user)
124 124
125 125
126 def auto_subscribe(post): 126 def auto_subscribe(post):
127 """ 127 """
128 Given a newly created post, perform an auto-subscribe action if the post 128 Given a newly created post, perform an auto-subscribe action if the post
129 creator has that option set in their profile. 129 creator has that option set in their profile.
130 130
131 """ 131 """
132 profile = post.user.get_profile() 132 profile = post.user.profile
133 if profile.auto_subscribe: 133 if profile.auto_subscribe:
134 post.topic.subscribers.add(post.user) 134 post.topic.subscribers.add(post.user)