views:

393

answers:

2

Hello, I'm learning Django and I have a problem. I want to have django user profile where the user can add some objects (he can add more than one) e.g. his addresses, his products and theirs description and so on. I've no idea how to do that. Thanks for any help.

Best regards, LH

+1  A: 

The best way to do this is to extend the user model via AUTH_PROFILE_MODULE. There's a great tutorial (doing part of what you want) on James Bennett's blog.

Dominic Rodger
A: 

Create a new model (say UserProfile) with a ForeignKey to the User model.

class UserProfile(models.Model):
    address = models.TextField()
    products = models.TextField()
    user = models.ForeignKey(User, unique=True)
Ramkumar Ramachandra