[Answered ]-List of contacts for User

2👍

You should checkout Many-To-Many relationships.

class UserProfile(models.Model):
    user = models.OneToOneField(User)
    avatar = models.CharField(max_length=40, default='0')
    activation_key = models.CharField(max_length=40, blank=True)
    key_expires = models.DateTimeField(default=django.utils.timezone.now)
    contacts = models.ManyToManyField(User)

Leave a comment