django-orm : How to update one-to-one relation field value
<p>models.py</p>

<pre><code>class Area(models.Model):
    area_name = models.CharField(max_length=255, null=False, blank=False)
    description = models.TextField(null=False, blank=False)

class AreaPoint(models.Model):
    x_axis = models.FloatField(default=0.0)
    y_axis = models.FloatField(default=0.0)
    area = models.OneToOneField(Area,primary_key=True,on_delete=models.CASCADE)
</code></pre>

<p>I try two method , but both fail ,please guide me. thank you</p>

<pre><code># first method : 
# Area.objects.filter(id=304).update(area_name="today is 1", description="today is 1", areapoint__x_axis=111,areapoint__y_axis=222)
# error : Area has no field named 'areapoint__y_axis'

# second method : 
obj = Area.objects.get(id=304)
print obj.areapoint.x_axis # 277
print obj.areapoint.y_axis # 65
obj.areapoint.x_axis = 100
obj.areapoint.y_axis = 200
print obj.areapoint.x_axis # 100
print obj.areapoint.y_axis # 200
obj.save()
print obj.areapoint.x_axis # 100
print obj.areapoint.y_axis # 200
</code></pre>

<p>The second method is weird.<br>
 <code>areapoint.x_axis</code> and <code>areapoint.y_axis</code> are really different after update. 
 But in my database.It still the same .  </p>