> 1. First principles: the absolute minimum a user table needs is a > unique string to identify a user. Theoretically, the user table's PK > suffices, but that's probably not enough to let a user log in, so > we'll need some string-based representation.
Personally, I think that the serial should be enough -- if someone wants user_email or user_name, they just subclass TG_User. Its ridiculously easy to subclass and add these fields. Its 3 lines of code and egregiously customizable. > 4. It seems to me that most public-facing apps that require an email > address will use it as the uniquely-identifying string, so that should > be large enough to hold an email address, and should be named in a > content-neutral way (like the current "userId" name, or its > PEP-8-compliant equivalent). exactly, which is why started complaining in the first place. perhaps 'unique_id' would work? since its tied to the password, i called it 'authentication_id' in a patch i submitted. > Would this be a reasonable default? I think display_name should go. its too much. serial + password + unique_id + timestamp created. if someone wants a display_name, its 1 line -- and they'd need to know enough of the internals to populate the field that they'd be able to subclass TGuser. I'm fine with it there, but I think its a bit of a waste. Having gone through both SOprovider and SAprovider, I have a question - they're 95% the same code. what about abstracting the core functionality into indentity/provider.py , then subclassing and overriding the necessary functions in identity/providers/sa.py ( or identity/providers.py if you want to keep things consolidated ). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

