Re: Template filters problem introduced in rev 10118

2009-03-24 Thread eXt
On 24 Mar, 15:26, Waylan Limberg wrote: > Well, you are using the `stringfilter` decorator, which, according to > the docs [1],  "will convert an object to its string value before > being passed to your function." Are you sure? The docs say about converting only the first

Re: Template filters problem introduced in rev 10118

2009-03-24 Thread Waylan Limberg
On Tue, Mar 24, 2009 at 9:57 AM, eXt wrote: > [SNIP] > > This worked before 10118. Starting from 10118 all filter's parameters > are passed as strings (why?) so it breaks my code causing: > > TypeError: slice indices must be integers or None or have an __index__ >

Template filters problem introduced in rev 10118

2009-03-24 Thread eXt
Hi! As apollo13 has suggested to me on #django I'm reporting here a problem I've ecountered. Revision 10118 of Django has introduced some changes to the way template filters work. I've simple filter: @register.filter @stringfilter def truncatestring(src, ln): ret = src[:ln] if