I'm +1 on adding a string truncation filter. I've yet to see a good reason not to, and there have been countless times I've needed it on real-world projects. As someone who has used the Django template language perhaps more extensively than anyone else out there, and as someone who has written books on CSS and web standards, I can confirm without a doubt that string truncation is needed in the real world, and that accomplishing it using slice and adding the ellipsis using template code, as Alex Gaynor suggested, is both ugly and not DRY at all.
So...why not? On Dec 30, 11:15 am, John Debs <johnthed...@gmail.com> wrote: > On Dec 30, 7:06 am, Russell Keith-Magee <freakboy3...@gmail.com> > wrote: > > > Secondly, IMHO raw truncation based on characters is bad practice for > > human readable text. A sentence is composed of words, not characters. > > Truncating a sentence mid-word isn't a typographical practice that I > > particularly want to encourage. > > I think the question that needs to be asked now is: What would it take > to convince the core members that this belongs in core? > > There are obviously a *lot* of django developers that want this, best > practice or not, and web development is often about making trade-offs > that work best for your scenario. Two of Django's core philosophies > (correct me if I'm wrong...) are making common developer tasks easy, > and keeping things DRY, and the current state of string truncation in > Django is neither of those things. > > I've seen a few +1's but no -1's, despite some resistance. Can we get > the opinions of a few more core developers so that this has a chance > of slipping in before the Jan. 5 feature deadline? -- 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.