更新时间:2023-11-30 15:57:10
Haystack具有templatetag高光,它可以按我的要求创建筋急转弯。
Haystack has templatetag higlight which creates "teaser" as i requested.
模板代码如下所示:
{{ result.object.get_title }}
{% highlight result.text with request.GET.q max_lenght 40 %}
{{ result.object.get_absolute_url }}
感谢#haystack IRC频道的人员。
Thanks to guys from #haystack IRC channel.