Couldn't this problem actually be solved by actually just expanding the
truncate_words syntax? instead of just allowing :"nr_of_words" to something
like 'count[cw],ellipsis'. e.g. '10c,...' actually meaning cut after 10
characters instead of words, of course always rounded up or down for the
last word so we don't end in the middle, and finally having a 3-dot
ellipsis. This can be done perfectly backwards-compatible as far as I know
and doesn't flood the namespace with dozens of filters with similar
functionality. Adding truncate now would mean a 3th filter that does more or
less the same (and then I even don't count slice), which in my opinion is
only even more confusing.

I'm also no big fan of putting this logic into templates anyway, I think too
many people use views just as a passthrough for object managers and do the
real data transform for viewing in the template, which isn't the purpose of
a template language. In general I am even against many of the already
included filters, so for me adding a new filter is certainly vote -1.

2009/12/30 Sean Brant <brant.s...@gmail.com>

> The last thing that needs to happen is bulling this into core. It's no
> good for the community and that could be part of the perceived
> perceptions problem. Just because enough people bitch does not mean
> that its a good thing. With that said the reason behind the ticket
> being closed no longer seems valid.
>
> A template filter for shortening a string seems like a logical
> addition to truncatewords. At the very least reassessing the ticket
> status might be a good start.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To post to this group, send email to django-develop...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-developers+unsubscr...@googlegroups.com<django-developers%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.


Reply via email to