twentytab-highlighter

A django app permits to highlight the searched words (self.query) in a long text and truncates it, counts number of chars == max_length


License
Other
Install
pip install twentytab-highlighter==0.1

Documentation

twentytab-highlighter

A django app permits to highlight the searched words (self.query) in a long text and truncates it, counts number of chars == max_length

Installation

Use the following command: pip install twentytab-highlighter

Configuration

INSTALLED_APPS = {
    ...,
    'highlighter',
    ...
}

Usage

In your html template

{% load highlight_tags %}

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>


{{a_very_long_text|highlight:"word"}}


</body>
</html>