Re: More standard template filters
There are already filters which works on advance logic. for example :- 'join'. So, is it not good to add filter for startswith, endswith and contains as well? On Friday, 5 April 2019 14:46:53 UTC+5:30, Adam Johnson wrote: > > FYI Jinja2 allows (most) python expressions, so this would Just Work(TM): > > {{ myvar.startswith("x") }} > > Django Template Language has a lot of legacy that prevents this from > happening, afaiu it would not be possible to move to it. > > It's not hard to move your templates (asides from those extending external > packages like the admin) to Jinja2, since the syntax is very similar and > you can pop a Jinja2 backend in your TEMPLATES. > > > > On Fri, 5 Apr 2019 at 07:43, Curtis Maloney > wrote: > >> On 4/5/19 3:06 AM, Collin Anderson wrote: >> > Hi All, >> > >> > I use django templates a lot and I always wished there was a >> > myvar|startswith:"teststring", myvar|endswith:"teststring" and a >> > myvar|contains:"teststring" filter. >> >> It's almost like we need a syntax for calling methods with an argument, >> just like we can with filters. >> >> For example (bring on the sheds for bikes!) >> >> {{ myvar.startswith<"teststring" }} >> >> > I instead do stuff like myvar|slice:":10" == "teststring" which is a >> > total hack. >> > >> > Is this something that could be simple and common enough to add to >> > django as batteries-included built-in? >> >> Alternatively, I recall some time in the past I may have written a >> "strings" template filter library simply to provide string methods as >> filters... >> >> -- >> Curtis >> >> -- >> 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-d...@googlegroups.com . >> To post to this group, send email to django-d...@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/a2b323bc-9f60-f4c9-6074-4d103bd6f930%40tinbrain.net >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > Adam > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/b447536a-a5e8-47d9-b06f-75f44ef87abc%40googlegroups.com.
Re: More standard template filters
So, can I create as a new feature and start working on it ? On Wednesday, 29 January 2020 22:36:09 UTC+5:30, Collin Anderson wrote: > > I think it would be helpful to have builtin startswith, endswith and > contains filters. > > On Thursday, January 23, 2020 at 4:40:32 PM UTC-5, keshav kumar wrote: >> >> There are already filters which works on advance logic. for example :- >> 'join'. So, is it not good to add filter for startswith, endswith and >> contains as well? >> >> On Friday, 5 April 2019 14:46:53 UTC+5:30, Adam Johnson wrote: >>> >>> FYI Jinja2 allows (most) python expressions, so this would Just Work(TM): >>> >>> {{ myvar.startswith("x") }} >>> >>> Django Template Language has a lot of legacy that prevents this from >>> happening, afaiu it would not be possible to move to it. >>> >>> It's not hard to move your templates (asides from those extending >>> external packages like the admin) to Jinja2, since the syntax is very >>> similar and you can pop a Jinja2 backend in your TEMPLATES. >>> >>> >>> >>> On Fri, 5 Apr 2019 at 07:43, Curtis Maloney wrote: >>> >>>> On 4/5/19 3:06 AM, Collin Anderson wrote: >>>> > Hi All, >>>> > >>>> > I use django templates a lot and I always wished there was a >>>> > myvar|startswith:"teststring", myvar|endswith:"teststring" and a >>>> > myvar|contains:"teststring" filter. >>>> >>>> It's almost like we need a syntax for calling methods with an argument, >>>> just like we can with filters. >>>> >>>> For example (bring on the sheds for bikes!) >>>> >>>> {{ myvar.startswith<"teststring" }} >>>> >>>> > I instead do stuff like myvar|slice:":10" == "teststring" which is a >>>> > total hack. >>>> > >>>> > Is this something that could be simple and common enough to add to >>>> > django as batteries-included built-in? >>>> >>>> Alternatively, I recall some time in the past I may have written a >>>> "strings" template filter library simply to provide string methods as >>>> filters... >>>> >>>> -- >>>> Curtis >>>> >>>> -- >>>> 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-d...@googlegroups.com. >>>> To post to this group, send email to django-d...@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/a2b323bc-9f60-f4c9-6074-4d103bd6f930%40tinbrain.net >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> -- >>> Adam >>> >> -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d49e01f7-856d-4b26-9db0-df18aa3b6b52%40googlegroups.com.
Reuqest To review on PR.
Hello, I have tried to solve a ticket https://code.djangoproject.com/ticket/20995 and sent a PR for that https://github.com/django/django/pull/12407 . Please give a look at that. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/59ea5ff4-2065-4cad-bf46-759c57b5caa6%40googlegroups.com.
help For GSoC Proposal (Improve Admin Filters)
Hello, I want to participate in GSoC with Django. And I want to work on 'Improve Admin Filters' Project. Here I am planning to work on issues related with filters which are not taken by anyone . Is this good approach ? Is there something more that would be helpful or needed which I can add as well , please mention it. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/9da51a2b-f2bf-46a3-a0c0-0849bca4026d%40googlegroups.com.
How to assign issue to self
Hii...I want to contribute to django. But I am not getting how to assign issue ticket to self. Can you tell me the step to assign issue. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/0b39ba38-1464-4866-a0c7-d959cbf3fff7%40googlegroups.com.
Re: How to assign issue to self
Thank you so much! I have done it. On Tuesday, 1 October 2019 18:08:59 UTC+5:30, keshav kumar wrote: > > Hii...I want to contribute to django. But I am not getting how to assign > issue ticket to self. Can you tell me the step to assign issue. > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/35a64344-7a54-4799-ba30-4d046c4e71ab%40googlegroups.com.
Query Regarding Ticket : #30817 Document that Sitemap.items() can return an iterable.
I have read all the description of this ticket but still I'm not getting what they wanted to do in this issue. Can you explain me more about it ? -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e5fbae5f-62c5-45a1-9aea-850b845c1cd4%40googlegroups.com.
#30864 Document and endorse django.utils.decorators.classproperty
I want to work on this ticket. Can you tell me how can I proceed for it? -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/26e29390-e452-41af-8a8a-cb7e0ad858f7%40googlegroups.com.
Re: #30864 Document and endorse django.utils.decorators.classproperty
Hi Adam, Thanks for your answer. I want to contribute to django, I have read many issues but still I am not getting how to work on it and what it wants from me to do. Can you suggest me only one ticket on which I can work. so that I can understand how the whole thing works. On Friday, 18 October 2019 02:17:11 UTC+5:30, keshav kumar wrote: > > I want to work on this ticket. Can you tell me how can I proceed for it? > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/73e6e6f9-211f-4e0a-a69a-bb95b4e90a51%40googlegroups.com.