On Tue, Mar 24, 2009 at 9:57 AM, eXt <restless.be...@gmail.com> 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__
> method
>
> It's obvious because I expect "ln" to be an int in this example.
>

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."

So, I would say if it worked before, that was a bug. Now it's fixed.
You'll have to edit your tag to coerce the string to an integer. Not
to hard to do, but a good idea even if it's not necessary.

[1]: 
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#template-filters-that-expect-strings
-- 
----
\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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