def process_action(self): self.node.question.reset_answer_count_cache() weibo_post(self.user,_("i have answer a question at %(app_name)s:%(question_title)s %(answer_url)s") % { 'app_name':settings.APP_SHORT_NAME, 'question_title':self.node.title, 'answer_url':urlparse.urljoin(settings.APP_URL,self.node.get_absolute_url()), })
def process_action(self): hash = ValidationHash.objects.create_new(self.user, 'email', [self.user.email]) send_template_email([self.user], "auth/welcome_email.html", {'validation_code': hash}) info=weibo_get(self.user,"users/show") if info is not None: weibo_post(self.user,_("i have joined the %(app_name)s, comming together! %(url)s") % { 'app_name':settings.APP_SHORT_NAME, 'url':settings.APP_URL, }) self.user.weibo_gravatar=info["avatar_hd"] self.user.use_weibo_gravatar=True self.user.save()