#29433 New split template filter

102 views
Skip to first unread message

Kamil Pluciński

unread,
May 29, 2018, 4:50:48 PM5/29/18
to Django developers (Contributions to Django itself)
Hi guys,
What do you think about new filter for splitting strings in templates? We need opinion for ticket: https://code.djangoproject.com/ticket/29433

Carlton Gibson

unread,
May 30, 2018, 6:32:48 AM5/30/18
to Django developers (Contributions to Django itself)
Hi Kamil, 

I'd think the preference here would be to NOT add new filters lightly — i.e. to close as wontfix — and recommend users create their own filters (or pull the logic into say a `get_context()` method) if they need this kind of thing. 

Slight aside: "Hi guys" may not fairly address everyone on the list. How about "Hi folks" or similar. 🙂

Kind Regards,

Carlton

Collin Anderson

unread,
May 30, 2018, 8:59:23 AM5/30/18
to django-d...@googlegroups.com
There's been a few cases where I would have found a split filter to be useful. I don't remember them off the top of my head.

I like that the behavior of it should be pretty well defined: just return obj.split() if val is None else obj.split(val)

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/50bc0125-3ba2-4429-82e0-4327d1490752%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages