On 03/15/2011 01:49 PM, Michael A. Ryan wrote:
In a typical client app, your User object is most
likely one robust object which you have to express in Django as both
User and UserProfile.

It's kind of hard to talk about "typical" Django app because there are so many different of them :-). However what's for sure is that significant share of Django projects consist of many apps. And those app may store their own profile information related to users. For example imagine some community site with a forum (an app), news comment system (another app) and anti-spam plugin (yet another app). A forum keeps track of users' achievements, comment system knows users' OpenID and anti-spam have a notion of users' karma. All those things are parts of a user profile.

If you think in these terms then the whole notion of a single default UserProfile becomes moot. Yes, it exists and does its job for simple situations but it's not a good ground for extensibility.

So when you go to pipe this information through
a tool like Django-Piston, you have to do a bit of slicing and dicing
in your handler code

Actually, you will have to do it anyway. Your API shouldn't just expose your internal model structure because it strongly couples interface to implementation. In any non-trivial systems APIs cannot be auto-generated.

--
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.

Reply via email to