Re: Inconsistent pagination when sorting by non-unique columns (ticket 34251)

2023-01-12 Thread Adrian Torres
I've been bitten by this once before as well but I think it's the kind of mistake you make once and never again, and if you happen to encounter it again you immediately know what it is (duplicated/missing items across pages? must be a non-unique ordering). I don't think implicitly adding an

Re: ticket 5929

2023-01-09 Thread Adrian Torres
I feel like this is a very niche use case and probably doesn't warrant implementing field-to-column one-to-many relationships in Django, I don't see why this specific case can't be implemented as: 1. A model that implements the data type 2. A custom field + custom datatype on the database

Re: [Technical Board?] Project Ideas, and beginning GSoC 2023.

2022-11-29 Thread Adrian Torres
I'd personally like to see better support for safe / N-1 compatible migrations within Django itself, currently if you do CD / blue-green tower / etc. deployments you need to be very careful about the migration operations that you introduce version-to-version, although I'm not sure what that

Re: Making max_length argument optional

2022-11-16 Thread Adrian Torres
nd Regards, > > Carlton > > > On Wed, 5 Oct 2022 at 12:47, Adrian Torres wrote: > >> Sorry for reviving the thread but just ran into this issue again and >> wanted to ask, has there anything been done to address this? >> >> For me having max_length=None mean

Re: Making max_length argument optional

2022-10-05 Thread Adrian Torres
Sorry for reviving the thread but just ran into this issue again and wanted to ask, has there anything been done to address this? For me having max_length=None mean "unlimited varchar" for Postgres and being an error for any other database (or those that don't support unlimited varchar) is the

Re: Model-level validation

2022-09-29 Thread Adrian Torres
Hi, Regardless of what you consider ModelForms to be, the fact that validation doesn't happen at the model level is very jarring if you've ever used any other MVC framework, it was and still is one of the major pet peeves of Django for me, to the point where we do something similar to what Uri

Re: Feature Request: New PostgreSQL ArrayField

2022-08-11 Thread Adrian Torres
Hi Liamine, I think there's various solutions you could try before going the custom field route: * You could try just using the 2D version and use some sentinel value for the date (NULL?) to treat the case where you just want an array of N prices. * You could try using django-polymorphic [1]

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

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

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: 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

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.