On Wed, Jun 22, 2011 at 10:14, raj <nano.ri...@gmail.com> wrote:
> If I didn't have the url
> set up in this manner, how would I manage to extract the userprofile?

If you have the "AuthenticationMiddleware" activated you would use request.user
This returns a User object, which you then can use to further edit things.

E.g.
user = request.user
user.username = "Somethingnew"
user.save()

Or, as Kevin Renskers said, you would create a seperate model for the
userprofile if you wanted to extend it. Here you will need to get the
user profile with user.get_profile() and remember to set the
following: AUTH_PROFILE_MODULE = "myapp.mysiteprofile"

Then you could use the above example like this:
user = request.user
user.get_profile().homepage = "http://example.org";
user.save()

-- 
With regards, Herman Schistad

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to