I have a custom filter that does just this that I use in virtually
every single Django project I use.  It's such a common pattern that it
seems almost silly not to have it included in core.  It's also small
enough that it won't add much in the way of maintenance.  Also, there
already exists a truncate_words, which has nice symmetry with the
proposed name.  Finally, as has been said before, it's something that
new users intuitively expect to find, so let's not disappoint them.

I quite strongly feel that slice is not a suitable alternative,
because 1) adding the ellipses requires a non-trivial amount of
additional template logic (and this logic need be repeated every time
ellipses are wanted) and 2) it makes the actual markup of the template
less semantically relevant.

Count me as a big +1 for including this.

Thanks,
Eric Florenzano

--

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