Re: Why can't range function be added in templates?

2021-10-10 Thread Dhruva Shaw
well my bad, tbh i wasn't shouting, just that caps was mistakenly on. If ever I was shouting then I would be using some words which wouldn't be appealing, :thinking: is bruh noo.. a slang or just an expression came out of shock! , i believe anyways `bruh no` is not a slang, *anyways nvm* On

Re: Why can't range function be added in templates?

2021-10-09 Thread Dhruva Shaw
Yup I agree that template system is added bonus, then why not more power to it? I do believe that it could be easily added but there are many beginners out who dont know how to implement and there many complex solutions present over the inetrnet. well ` j.squad_entry_members` is no (dataype

Re: Why can't range function be added in templates?

2021-10-09 Thread Benny
FWIW The template system always seemed like an added bonus to the project. Which is fine because, personally, I’d rather more effort go into the guts than the lipstick anyway. It’s easy enough to build custom filters, or even exploit some of the quirks of the system… so much so that asking

Re: Why can't range function be added in templates?

2021-10-09 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Please don't use shouty capitals or angry slang like "Bruh no" on this mailing list. This mailing list is for calm professional discussion. On Sat, 9 Oct 2021 at 11:35, Dhruva Shaw wrote: > SINCE THE NO OF SELECT BOXES THAT I HAVE GENERATE COMES DIRECTLY FROM THE > DATABSE, THUS RANGE FUNCTION

Re: Why can't range function be added in templates?

2021-10-09 Thread Dhruva Shaw
SINCE THE NO OF SELECT BOXES THAT I HAVE GENERATE COMES DIRECTLY FROM THE DATABSE, THUS RANGE FUNCTION IS NEEDED! On Saturday, October 9, 2021 at 2:40:29 PM UTC+5:30 f.apo...@gmail.com wrote: > On Friday, October 8, 2021 at 6:14:19 PM UTC+2 dhruv...@gmail.com wrote: > >> Ik range function can

Re: Why can't range function be added in templates?

2021-10-09 Thread Dhruva Shaw
BRUHHH NOOO, I HAVE TO GENERATE A NO OF SELECT BOXES , AND HAVE MANY SELECT BOXES WILL GENERATED COMES DIRECTLY FROM THE DATABSE On Saturday, October 9, 2021 at 2:40:29 PM UTC+5:30 f.apo...@gmail.com wrote: > On Friday, October 8, 2021 at 6:14:19 PM UTC+2 dhruv...@gmail.com wrote: > >> Ik

Re: Why can't range function be added in templates?

2021-10-09 Thread Florian Apolloner
On Friday, October 8, 2021 at 6:14:19 PM UTC+2 dhruv...@gmail.com wrote: > Ik range function can be added but I also mentioned that there are some > cases range function can't be direct generated from the view like this >

Re: Why can't range function be added in templates?

2021-10-08 Thread Dhruva Shaw
Ik range function can be added but I also mentioned that there are some cases range function can't be direct generated from the view like this https://github.com/Tanzanite-lpu/tgl-2.0.0/blob/ddce5ef87a4b5248b8cb8cd5fa3df4adb3f00b31/main/templates/groups.html#L36 Well I did add the range with

Re: Why can't range function be added in templates?

2021-10-08 Thread Dhruva Shaw
Ik range function can be added but I also mentioned that there are some cases range function can't be direct generated from the view like this https://github.com/Tanzanite-lpu/tgl-2.0.0/blob/ddce5ef87a4b5248b8cb8cd5fa3df4adb3f00b31/main/templates/groups.html#L36 Well I did add the range with

Re: Why can't range function be added in templates?

2021-10-08 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Django’s general policy is that templates should be kept as simple as possible. It's possible to create range() objects in the view, place them in the context, and then iterate over them in templates. Also, adding range() for a project is a few lines of code with simple_tag:

Why can't range function be added in templates?

2021-10-02 Thread Dhruva Shaw
I did read this comment https://code.djangoproject.com/ticket/13088#comment:1 and it says its more like adding programming to templates! :( Isn't whole template a programming (made up of programming blocks)?? I mean there is a for loop and all , also there are some cases where you need a