I have a class PersonProfile, and a class Person. In the class Person i have a relationship OneToOne with PersonProfile. How can i Serialize that?
class PersonProfile(models.Model):
interests = models.CharField(max_length=200, blank=True)
researchLines = models.CharField(max_length=200, blank=True)
loginName = models.CharField(max_length=50, blank=True)
class Person(models.Model):
profile = models.OneToOneField(PersonProfile)
enviroment = models.ForeignKey(Enviroment, related_name="persons")