Django HTML truncation
django, django-templates
Solution
It would be best to write your own filter. You could take the source code for truncatewords_html and use it as a template for your filter. It should take a few changes to get what you want, and then you will just need to register your template and make sure you load it on the page you want to use it on and you should be good.
See this page for more info https://docs.djangoproject.com/en/dev/howto/custom-template-tags/
https://code.djangoproject.com/browser/django/trunk/django/template/defaultfilters.py#L288
You should be able to copy the method and just change the Code to this.
`return Truncator(value).words(length, html=True, truncate=' see more')`
You want to make 'see more' a link, that will take more code. I would change the filter to accept another param which is the link for 'see more'.
Then instead of just having 'see more' passed to Truncator you would pass the HTML link.
Problem
I'm using the build-in truncatewords_html filter of Django and it adds "..." in the end, instead, I want to replace this with a link "See More". How can I achieve this?