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