Wednesday, April 27, 2011

Re: Hyperlinks in Messages

Just use appropriate filter for your raw message.

For example to make all urls clickable in you message, you can apply urlize filter

 <ul>     {% for message in messages %}     <li>{{ message|urlize }}</li>     {% endfor %} </ul>

Or use safe to render raw html in your messages.

On Wed, Apr 27, 2011 at 8:29 AM, Venkatraman S <venkat83@gmail.com> wrote:
Hi,

How can i include hyperlinks in the messages?(am using the messages framework).
The hyperlinks dont seem to get rendered; am getting the text'd version of the HTML.

-Venkat

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment