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 si

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 si

Re: Violating unique constraint in the admin

2021-10-08 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
See also https://code.djangoproject.com/ticket/30581 which hoists constraint validation to forms in general, not just the admin. On Fri, 8 Oct 2021 at 13:43, Tim Graham wrote: > Hi, there have been some past discussions, e.g. > https://groups.google.com/g/django-developers/c/Dju2vvbzECI/m/vYDnYe

Change the way values FK fields on a custom User model are handled for the 'createsuperuser' command

2021-10-08 Thread Christophe Henry
Hello Django developpers, Following the discussion I had with Mariusz Felisiak on PR #14913 , I would like to suggest a small change

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: https://docs.djangopro

Re: Violating unique constraint in the admin

2021-10-08 Thread Tim Graham
Hi, there have been some past discussions, e.g. https://groups.google.com/g/django-developers/c/Dju2vvbzECI/m/vYDnYekgBQAJ On Friday, October 8, 2021 at 6:34:02 AM UTC-4 Fab wrote: > Hi, > > When I violate a unique constraint in the admin I get an error page. > > I know I can check this myself a

Violating unique constraint in the admin

2021-10-08 Thread Fab
Hi, When I violate a unique constraint in the admin I get an error page. I know I can check this myself and show an error message when the form is cleaned but I feel like this should be handled by default. Are there any reasons why it shouldn't show an error message on the admin page? Cheers,