How to save links in Django

Posted by xRobot on Stack Overflow See other posts from Stack Overflow or by xRobot
Published on 2010-05-20T12:45:05Z Indexed on 2010/05/20 13:20 UTC
Read the original article Hit count: 173

Filed under:
|

I have a simple Blog model with a TextFields. What is the best way to save link ?

1) Saving link in the database in this form: http://www.example.com and then using some filter in the template to trasform it in form:

<a rel="nofollow" href="http://www.example.com>http://www.example.com</a>

2) Saving link in the database directly in this form:

<a rel="nofollow" href="http://www.example.com>http://www.example.com</a>

© Stack Overflow or respective owner

Related posts about django

Related posts about django-templates