Re: transaction.on_commit() proposal

2022-08-22 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I'd also be okay with a docs change, although this wouldn't help avoid late-binding bugs quite so much. On Mon, Aug 22, 2022 at 1:51 PM Carlton Gibson wrote: > Related ticket from this weekend, suggesting a docs change: > https://code.djangoproject.com/ticket/33939 > > On Mon, 22 Aug 2022 at

Easy Pickings: admin change_form label does not use mark_safe

2022-08-22 Thread Caram
I've just opened a ticket for this issue. The problem is that the label is not escape. There is no such issue with change_list.html. https://code.djangoproject.com/ticket/33946#ticket -- You received this message because you are subscribed to the Google Groups "Django developers

RE: Make timeout property for PasswordResetTokenGenerator

2022-08-22 Thread Danilov Maxim
Hi Alexander. You can simply override ‘check_token’ to avoide this harcoded settings.PASSWORD_RESET_TIMEOUT on the 57 line. And for yours task it can be with super call and after add additional check. It is only some additional lines: MyСlassFromPasswordResetTokenGenerator(…):

Make timeout property for PasswordResetTokenGenerator

2022-08-22 Thread Alexander Voloshchenko
During project development our team needs to create several types of tokens. One of them will be used in case of account reset password. The second one is for account activation. Django itself has a good class for token generation called PasswordResetTokenGenerator. And now for account

Re: transaction.on_commit() proposal

2022-08-22 Thread Carlton Gibson
Related ticket from this weekend, suggesting a docs change: https://code.djangoproject.com/ticket/33939 On Mon, 22 Aug 2022 at 14:11, 'Adam Johnson' via Django developers (Contributions to Django itself) wrote: > Hi > > I just wrote a blog post on a late-binding bug that can occur with using >

transaction.on_commit() proposal

2022-08-22 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi I just wrote a blog post on a late-binding bug that can occur with using transaction.on_commit() with a function or lambda within a loop. THe post shows how using functools.partial() solves this. See the post here:

Re: Feature Request: get_default_backend() in django.template.Engine

2022-08-22 Thread Carlton Gibson
Hi Peter. I agree with you that the documentation isn't that clear here. *"Why are there two template classes?", "Why does one take a dict and the other a Context?"* — that comes up.  I don't think your suggestion itself it that unreasonable, but I'm wary about expanding the API here, at