Hi, Joseph Kocherhans wrote: > > I was just about to ask the same question: I need to add some fields to > > the User model and the only way I see is actually changing the auth > > app. Is that so, or did I miss something? > > I'd recommend using the approach outlined here: > http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model
thanks for the URL, I did not see this page previously. The approach works, but I want to use Django's admin interface to let administrators edit that additional data as well. I can use ForeignKey limited to one item for that, but then I have to specify some of additional fields as core and thus required. This just does not work too well with the data I need to put there. So, for me patching contrib.auth still looks like the best way to add that data. Perhaps, since that seems to be a very common need, it would be possible to add a generic way to plug additional fields into the User model. Like, say, a metaclass just for auth.User that would check settings and patch the User attributes (field list, Admin and Meta contents) before passing control back to ModelBase. That looks doable, but I have yet to find a nice and clean way to specify those changes in project settings. Or some more appropriate place. That said, changing the contrib.auth code does not sound too scary to me and might as well require the least effort to maintain. Thanks again, -mk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---