I'm currently using one solution proposed at the forum, replacing
{{ blog_post.description_from_content }}
with a
{% if blog_post.gen_description %}
{{ blog_post.content|safe|truncatewords:60 }}
{% else %}
{{ blog_post.description|safe }}
{% endif %}
and it works pretty well, but I believe
I'm currently using one solution proposed at the forum, replacing
{{ blog_post.description_from_content }}
with a
{% if blog_post.gen_description %}
{{ blog_post.content|safe|truncatewords:60 }}
{% else %}
{{ blog_post.description|safe }}
{% endif %}
and it works pretty well,
Another solution: let the developer point to a callable via settings.
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
description = content[:max_char_count]
Isn't something like this viable?
Em segunda-feira, 16 de maio de 2016 09:54:53 UTC-4, Ryne Everett escreveu:
>
> Maybe a char count, or word count?
>>
>
> What happens when the first sentence is too small? Use the second sentence?
>
> My experience is
Isn’t there a better algorithm to automatically generate the description?
Maybe a char count, or word count?
My experience is that it’s rather annoying to manually set the description
- which you have to do every time your post begins with a short sentence,
since the generated description