Closed caprioara closed 3 years ago
Hello guys. I am trying to truncate my content field in template and I dont know how.
This is my content in model:
class BlogPost(models.Model): content = MDTextField(default=' ')
Is there any way to do it? His is what i found on internet {{ blog_post.content | custom_markdown | truncatechars_html:300 }} but it didnt work either
{{ blog_post.content | custom_markdown | truncatechars_html:300 }}
It seems like it works like this:
<div id="content"><textarea> {{blog_post.content|truncatechars_html:500}} </textarea></div>
It was my template that has a problem
Hello guys. I am trying to truncate my content field in template and I dont know how.
This is my content in model:
Is there any way to do it? His is what i found on internet
{{ blog_post.content | custom_markdown | truncatechars_html:300 }}
but it didnt work either