Re: linebreaksli template filter

2007-06-21 Thread Malcolm Tredinnick
e value for a > > linebreaksli template filter. > > A more general solution might be to have a linebreakstag filter that > takes arguments: > > {{ mytext|linebreakstag:"," }} > > This tag would be able to handle what the linebreaksbr filter does too: &g

Re: linebreaksli template filter

2007-06-21 Thread SmileyChris
> This has got me thinking though, do we even really need the two > linebreaks filters that exist now? Yes. You're underestimating what the linebreaks filter does. It breaks the text up into a list, splitting on multiple new-lines. Each of those list items get wrapped in a (after getting their s

Re: linebreaksli template filter

2007-06-21 Thread Gary Wilson
[EMAIL PROTECTED] wrote: > I don't want to attempt to pollute Django's beautiful template library > namespace with garbage, but I do see a legitimate value for a > linebreaksli template filter. A more general solution might be to have a linebreakstag filter that takes ar

Re: linebreaksli template filter

2007-06-20 Thread gulopine
It looks like it'd make an excellent submission over at djangosnippets[1]. -Gul [1] http://www.djangosnippets.org/ On 6/20/07, SmileyChris <[EMAIL PROTECTED]> wrote: > > On Jun 20, 5:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > My code is below. It wouldn't take too much to > >

Re: linebreaksli template filter

2007-06-19 Thread SmileyChris
On Jun 20, 5:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > My code is below. It wouldn't take too much to > convert it to a Django template filter. What does everyone think? Interesting filter. Personally, I'm not sure this is useful enough for core. --~--~-~--~~

linebreaksli template filter

2007-06-19 Thread [EMAIL PROTECTED]
I don't want to attempt to pollute Django's beautiful template library namespace with garbage, but I do see a legitimate value for a linebreaksli template filter. It does just what it says - converts a string with linebreaks into a set of list items. Sometimes, a tag just doesn