Hello developers,

I've been using Django for a couple of months now on a new project and I've 
come across something which I think might be improved upon. It deals with the 
nature of UserProfile, which I think is a very handy tool overall.

The thing I'm not totally satisfied with is the way that UserProfile and User 
are totally separate objects once you have them at the python level. An example 
of an area where this separation might be an issue is making a JSON web service 
that needs to send a full User object to a client. 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. 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 to get both objects through in the same request, or 
manually create a nice neat object for Piston to deliver to the client in a way 
the client will be able to consume without having to worry about matchmaking 
Users and Profile.user_id fields.

Now, I am really not even advanced in Python, and I've only been using Django 
for a couple of months, but it seems to me like having a convenience method 
similar to get_profile() that automatically enumerates through your profile 
object and produces a flattened version of your client friendly user object 
might be a very useful thing to have.

Maybe there is already an easy and kosher way to do this in Python that I am 
unaware of, regardless, it just seems like something that would be handy to 
have for people who deal primarily with using Django to serve non-web clients.

I don't have a good sense of if this is something that is appropriate for 
Django Auth or should just be a property of my custom profile object, but I 
thought I might throw it out there for consideration.

Thanks for your time,

Michael

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