def follow_html(text): from film20.followers.models import FOLLOW_TXT username1, txt, username2 = text.split(' ') user1link = url_username_link(username1) user2link = url_username_link(username2) to_return = "<a href=" + user1link + ">" +username1+"</a>"+ FOLLOW_TXT + "<a href=" + user2link + ">" +username2+"</a>" return to_return
def save(self, *args, **kw): logger.debug("saving") first_save = False if self.pk is None: first_save = True super(Followers, self).save(*args, **kw) # v hack for #FLM-1572 if first_save and self.status == Followers.FOLLOWING and self.to_user.username <> "blog": self.save_activity() notification.send( [self.to_user], "following", {"to_user": self.to_user, "from_user": self.from_user, "link": url_username_link(self.from_user)}, )
def save(self, *args, **kw): logger.debug("saving") first_save = False if self.pk is None: first_save = True super(Followers, self).save(*args, **kw) # v hack for #FLM-1572 if first_save and self.status==Followers.FOLLOWING and self.to_user.username <> 'blog': self.save_activity() notification.send([self.to_user], "following", { 'to_user': self.to_user, 'from_user' : self.from_user, 'link' : url_username_link(self.from_user) } )
def format_username(self, at_char, username): return '<a href="%s" rel="nofollow">%s%s</a>' % ( url_username_link(username), at_char, username)
def format_username( self, at_char, username ): return '<a href="%s" rel="nofollow">%s%s</a>' % ( url_username_link( username ), at_char, username )