0
我有這個簡單的Post模型:如何保存標籤和參數鏈接的文本字段
class Post(models.Model):
title = models.CharField(_('title'), max_length=60, blank=True, null=True)
body = models.TextField(_('body'))
blog = models.ForeignKey(Blog, related_name="posts")
user = models.ForeignKey(User)
我想,當我在表格中插入鏈接,那麼這些鏈接都來自這種形式保存在體內:
http://www.example.com or www.example.com
這種形式(與標籤和rel = 「nofollow的」 參數):
<a href="http://www.example.com" rel="nofollow">www.example.com</a>
哪有我這樣做?
謝謝^ _^
YESSS,我想用JavaScript來做到這一點,但我不知道。你可以幫幫我嗎 ?現在我正在使用urlize過濾器。 謝謝^ _ ^ – xRobot 2010-05-30 08:10:40