Re: Idea: Add .checked(/) to QuerySet as alternative to .filter() w/ .first()

2022-06-21 Thread Adrian Torres Justo
A common idiom is also ``` try: foo = Foo.objects.get(x="foo") except Foo.DoesNotExist: foo = None ``` which is pretty pythonic IMO, but I wouldn't be opposed to a keyword-only argument on `get` that returns `None` if not found ``` foo = Foo.objects.get(x="foo", strict=False) # or foo =

RFC #33561 -- Synchronize user attributes on every authentication with RemoteUserBackend

2022-03-04 Thread Adrian Torres Justo
Hello all, I'd like to get your feedback and comments regarding the ticket mentioned in the subject line: adding a mechanism/hook to the RemoteUserBackend that allows for synchronization of user attributes between the remote system and the django server on each authentication attempt. Synchron

Re: RFC #33561 -- Synchronize user attributes on every authentication with RemoteUserBackend

2022-03-05 Thread Adrian Torres Justo
Hey Florian, First of all, thank you for the feedback and I'm glad you agree that the feature would be nice to have :) I'm willing to implement whichever version people agree on since I do think the feature will be useful, but I do think that having separate methods is clearer, simpler, as well a

Re: RFC #33561 -- Synchronize user attributes on every authentication with RemoteUserBackend

2022-03-07 Thread Adrian Torres Justo
Alright, I'm still not 100% convinced it wouldn't be best having them as separate methods, but for the sake of moving things along I'll implement it. One thing that's not quite clear: you mentioned adding a backwards compatibility warning, is this the same as a RemovedInDjangoXXWarning? Should

Re: Improvements to the startproject template

2022-04-21 Thread Adrian Torres Justo
I personally dislike Adam's suggestion and feel like it makes it worse than the current default, but to each their own. I do prefer the proposed solution of the config directory, I am working on two django projects in parallel and one follows the proposed config scheme and the other doesn't (us