Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safe filter with highlight template tag django-haystack

I'm using Django Haystack to make search on my site, but i need to filter all html code of my TextField with the template filter "safe" and highlight the search results according to search criteria.

Is there a way to do this? I've tried with

{% highlight result.object.content|safe with query %}

but it doesn't work.

like image 609
eos87 Avatar asked Nov 14 '22 03:11

eos87


1 Answers

Dont you forget to load {% highlight %} template tag?

like image 194
errx Avatar answered Dec 19 '22 23:12

errx