[Django] #29433: templatefilter "make_list" should receive a optional split variable

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
#29433: templatefilter "make_list" should receive a optional split variable
-------------------------------------+-------------------------------------
               Reporter:  danilovmy  |          Owner:  nobody
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Template   |        Version:
  system                             |
               Severity:  Normal     |       Keywords:  templatefilter,
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  1
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 for use in template, for example:
 not only
 {% with my_list='i#am#stupid#user'|make_list %}
 #
 my_list=['i','#','a','m','#','s','t','u','p','i','d','#','u','s','e','r']
 ......

 it should to work too:

 {% with my_list='i#am#stupid#user'|make_list:'#' %}
 # my_list=['i','am','stupid','user']
 ......

--
Ticket URL: <https://code.djangoproject.com/ticket/29433>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/052.27dbbdba5c846b1b555bd8b58e29e56a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+--------------------------------------
     Reporter:  danilovmy        |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+--------------------------------------

Old description:

> for use in template, for example:
> not only
> {% with my_list='i#am#stupid#user'|make_list %}
> #
> my_list=['i','#','a','m','#','s','t','u','p','i','d','#','u','s','e','r']
> ......
>
> it should to work too:
>
> {% with my_list='i#am#stupid#user'|make_list:'#' %}
> # my_list=['i','am','stupid','user']
> ......
New description:

 for use in template, for example:
 not only
 {{{
 {% with my_list='i#am#stupid#user'|make_list %}
 #
 my_list=['i','#','a','m','#','s','t','u','p','i','d','#','u','s','e','r']
 }}}
 ......

 it should to work too:
 {{{
 {% with my_list='i#am#stupid#user'|make_list:'#' %}
 # my_list=['i','am','stupid','user']
 }}}
 ......

--

Comment (by Tim Graham):

 I'm on the fence. While I see the value, I'm not sure that promoting more
 logic in templates in a good idea. It's fairly easy to write a custom
 filter (I would call it "split") which I think would be more readable.

--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.08e14770868241ce79fc081b465f1518%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+--------------------------------------
     Reporter:  danilovmy        |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Jeff):

 I feel somewhat ambivalent about this as well. If we decide to add the
 split feature, would it make more sense to add a new tag "split" instead
 of changing the behavior or "make_list" Do we want to add this at all?

 Replying to [comment:1 Tim Graham]:
 > I'm on the fence. While I see the value, I'm not sure that promoting
 more logic in templates in a good idea. It's fairly easy to write a custom
 filter (I would call it "split") which I think would be more readable.

--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.48fc058a30cf9834458a11ea8c3915fc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+--------------------------------------
     Reporter:  danilovmy        |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+--------------------------------------
Changes (by Jeff):

 * cc: Jeff (added)


Comment:

 I feel somewhat ambivalent about this as well. If we decide to add the
 split feature, would it make more sense to add a new tag "split" instead
 of changing the behavior or "make_list" Do we want to add this at all?

 Replying to [comment:1 Tim Graham]:
 > I'm on the fence. While I see the value, I'm not sure that promoting
 more logic in templates in a good idea. It's fairly easy to write a custom
 filter (I would call it "split") which I think would be more readable.

--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.8817169b9313e1f47b885a02750874ee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+--------------------------------------
     Reporter:  danilovmy        |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Kamil):

 If we decide to do it, I will be happy to do it.

--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.1aeeacd598b79cb815bc59d7a6dee620%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+--------------------------------------
     Reporter:  danilovmy        |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Ingo Klöcker):

 I also think that adding a {{{split}}} filter (there's already a
 {{{join}}} filter) is useful. Sometimes we store lists of strings in
 simple CharFields and for display we need to replace the separator with a
 more human-friendly separator.

 So, who's going to decide if it shall be added?

--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.824f453e32b0589d6526c981b9972c3b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+-----------------------------------------
     Reporter:  danilovmy        |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Someday/Maybe
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+-----------------------------------------
Changes (by Tim Graham):

 * stage:  Unreviewed => Someday/Maybe


Comment:

 Write to the DevelopersMailingList to get a consensus about how to
 proceed.

--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.e1bf0e7bcc9da98f803ee946340cd9c3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+-----------------------------------------
     Reporter:  danilovmy        |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Someday/Maybe
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+-----------------------------------------

Comment (by Kamil):

 You can see the discussion
 [https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg
 /django-developers/DVDuhKXPweU/LSUdoQfDAQAJ here].

--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.3eb8685771d040e84e83b31e0f9b7e22%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+-----------------------------------------
     Reporter:  danilovmy        |                    Owner:  hehaha
         Type:  New feature      |                   Status:  assigned
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Someday/Maybe
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+-----------------------------------------
Changes (by hehaha):

 * owner:  nobody => hehaha
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.a735384ef682ad0dc8bd359cb5121128%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+-----------------------------------------
     Reporter:  danilovmy        |                    Owner:  (none)
         Type:  New feature      |                   Status:  new
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Someday/Maybe
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+-----------------------------------------
Changes (by hehaha):

 * owner:  hehaha => (none)
 * status:  assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.079ea84d6dd095432dccace2b073edd6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+-----------------------------------------
     Reporter:  danilovmy        |                    Owner:  Prakash
         Type:  New feature      |                   Status:  assigned
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:
     Keywords:  templatefilter,  |             Triage Stage:  Someday/Maybe
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+-----------------------------------------
Changes (by Prakash):

 * owner:  nobody => Prakash
 * status:  new => assigned


Comment:

 Assigning  to myself

--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.a7f17c66347aebc23688b7fbaa642d6a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29433: templatefilter "make_list" should receive a optional split variable

Django
In reply to this post by Django
#29433: templatefilter "make_list" should receive a optional split variable
---------------------------------+-----------------------------------------
     Reporter:  danilovmy        |                    Owner:  Prakash
         Type:  New feature      |                   Status:  closed
    Component:  Template system  |                  Version:
     Severity:  Normal           |               Resolution:  wontfix
     Keywords:  templatefilter,  |             Triage Stage:  Someday/Maybe
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+-----------------------------------------
Changes (by Tim Graham):

 * status:  assigned => closed
 * resolution:   => wontfix


Comment:

 Closing as the mailing list didn't yield consensus to add this.

--
Ticket URL: <https://code.djangoproject.com/ticket/29433#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" 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].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.1e7884316bc17ad2f66d5e3dd3b29d99%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.