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
> 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
[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
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
> >
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.
--~--~-~--~~
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