Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
class UserProfile(models.Model):
# This line is required. Links UserProfile to a User model instance.
user = models.OneToOneField(User)
# The additional attributes we wish to include.
website = models.URLField(blank=True)
# Override the __unicode__() method to return out something meaningful!
def __str__(self):
return self.user.username
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question