I am doing it with template filters. There's a "highlight" function
that I use like this:

{{ var|highlight:keyword }}

  Where "keyword" is the search term. The function adds a
<strong></strong> around the word.

On 3/27/06, bradford <[EMAIL PROTECTED]> wrote:
>
> A question came up in #django and I was wondering what the best
> solution may be: how to highlight search results.
>
> Here are some possibilities:
> 1.  Add <span class="highlight"></span> in around the returned results
> for the searched words in the view.
> 2.  Template filter
> 3.  Template tags
>
> Please expand on any ideas.
>
> Thanks
>
>
>
>


--
Julio Nobrega - http://www.inerciasensorial.com.br

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to