You could create a UserProfile that is essentially just a single member with a selectable type.
Depending on the response, go grab that other profile for the user. Wrap this in a function: def getRealProfile(user): p = user.get_profile() if p.Type == 'a': return AProfile.objects.filter(user=user)[0] elif. ... I don't really like this option too much though. Ivan On Jan 28, 12:11 pm, Chris Pratt <[EMAIL PROTECTED]> wrote: > This question has been asked a few times before, but doesn't seem to > be getting any responses. > > I'm working on a project where we have three types of users, each > requiring vastly different profile models. The AUTH_PROFILE_MODULE > setting, obviously, allows only one profile to be specified. > > One response to this question suggested branching from an intermediate > profile model. Thereby, you could call something like: > > request.user.get_profile().get_for_user() > > and it would return the appropriate profile. This seems like a fair > enough approach, but it's a bit kludgy, and certainly doesn't lend > itself towards DRY code that anyone can manipulate. What happens if > someone comes along later and doesn't know they're supposed to tack on > the extra method call? > > It would be easy enough to rewrite the get_profile() method to pull > the right profile and then monkey patch the User model, but this feels > wrong. > > What would be considered best practice here? > > Thanks, > Chris Pratt --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---