What is the criteria in the User model that gives you users profile
model ? If you don't have such a criteria in User's model then you
have answered your question,

On Jan 28, 9: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
-~----------~----~----~----~------~----~------~--~---

Reply via email to