#29433 New split template filter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

#29433 New split template filter

Kamil Pluciński
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

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/bfd7a876-63e7-491b-b255-3bf335224dd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: #29433 New split template filter

Carlton Gibson-3
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

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 | Threaded
Open this post in threaded view
|

Re: #29433 New split template filter

Collin Anderson-2
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)

On Wed, May 30, 2018 at 6:32 AM, Carlton Gibson <[hidden email]> wrote:
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

--
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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAFO84S7c8bXPYaOEUb0-H%3DMqd3iv9Kx4xrDW%3D0HDxhetwH7ZdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.