DISCLAIMER: I'm just a hobbyist posting to an experienced developers' list.
I for one really like Jacob's approach. I may be missing something, but my only concern right now is being able to infer which profiles are attached to the User model at any given point. Moreover, I'd like to be able to catch that KeyError exception (which I would prefer to be wrapped in something more specific like "MultipleDataError") and handle it appropriately. For example, drawing from the example in the gist, say I want to allow the user to change his 'name' for every associated profile he has. user.data.dict('name').keys() will show me the existing profiles, and I guess I could use these keys to access every profile... but it doesn't seem like the ideal solution. I can see the need for something like user.data.update({'name': 'Joe K. Smith'}) to forcefully update the name in every profile. In my humble newbie opinion, there's a lot of syntactic sugar to be added here to make working with multiple profiles as sweet as we want it to be. Things like user.profiles, or even defining a 'default' profile that point how MultipleDataErrors should be resolved. Cheers, AT On Tue, Apr 3, 2012 at 11:28 AM, Alex Ogier <alex.og...@gmail.com> wrote: > Hi developers, > > I have written up a little bit about the alternate proposal that I made a > while ago, Solution 2a from > https://code.djangoproject.com/wiki/ContribAuthImprovements > > In addition to other arguments, there is a point-by-point breakdown of > what I feel are the weaknesses in Jacob's proposal. > > You can find it at https://gist.github.com/2289395 > > Best, > Alex Ogier > > > On Mon, Apr 2, 2012 at 8:35 PM, Jacob Kaplan-Moss <ja...@jacobian.org>wrote: > >> Hi folks -- >> >> I've written up a proposal for how *I* would like to address refactoring >> auth.user: https://gist.github.com/2245327. >> >> In essence, this does two things: >> >> * Vastly "prunes" the required fields on auth.user. The only things left >> are an "identifier" (which could be username, email, url, uuid, whatever), >> and a password. >> * Introduces a new "profile" system that provides a way to contribute >> extra related fields. Multiple profiles are supported, along with some >> syntactic sugar for dealing with multiple profiles in a reasonably reusable >> way. >> >> And that's about it. I'm deliberately trying to find a middle ground >> between "do the minimum to allow people to move on" and "throw out and >> rewrite django.contrib.auth entirely". I'm not expecting everyone to be >> thrilled by this idea, but I'm hoping that this is "Good Enough" for almost >> everyone. >> >> For more please see the document. Please do try to read the whole thing: >> I've had a few rounds of feedback incorporated already, and there's even an >> FAQ at the end. >> >> I'm not using BDFL fiat here, at least not yet. This is a proposal, and I >> very much want to hear feedback, objections, and alternatives. I'm >> particularly interested in hearing from people who've got complicated auth >> needs and think this absolutely won't work for them. >> >> I *have* reviewed all the other proposals and I'm between -0 and -1 on >> all of them. This means that if you don't like my proposal, you'll probably >> have to come up with a complete *new* idea to have any chance of getting my >> vote. >> >> Thanks! >> >> Jacob >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django developers" group. >> To post to this group, send email to django-developers@googlegroups.com. >> To unsubscribe from this group, send email to >> django-developers+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-developers?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.