コード例 #1
0
ファイル: models.py プロジェクト: m00p/gamecup
 def htmlfrombbcode(self):
     soup = BeautifulSoup(self.message)
     #remove all html tags from the message
     onlytext = ''.join(soup.findAll(text=True))
     
     #get the bbcode for the text
     if(len(onlytext.strip()) >  0):            
         return render_bbcode(onlytext)
     else :
         return ""
コード例 #2
0
ファイル: models.py プロジェクト: m00p/gamecup
 def htmlfrombbcode(self):
     if(len(self.message.strip()) >  0):
         return render_bbcode(self.message)
     else :
         return ""