....
from django.contrib.auth.models import User
class Person(models.Model):
user = models.OneToOneField(User)
avatar = models.ImageField(upload_to="photos/")
level = models.IntegerField(default=0)
def __unicode__(self):
return u"%s" % self.user
I'd like to add an edit-person page where the user can modify his profile if he wants to. So I created not only a form for the model Person but also another one for the django model User so that the user can modify information such as username, last_name, first_name, email etc
I'm not proud of the way I did it although it works well. So my question is: Is there a way that I can "explode" the django User field which is in my Person model instead of having a select list in my client side?