Need help with relation between Django models

i made 2 classes in django males and females and i make a one to one relation now everything is fine and migration works and database ding exactly what i need but when i create a form and get the info of males and females from there i cant assign the girl name and age to class males
see my code
those are classes:

class Females(models.Model):
    name=models.CharField(max_length=20)
    age=models.CharField(max_length=20)
    boolean=models.BooleanField(default=True)
    def __str__(self):
        return self.name
    

class Males(models.Model):
    name=models.CharField(max_length=20)
    age=models.CharField(max_length=20)
    girl=models.OneToOneField(Females,on_delete=models.CASCADE)
    boolean=models.BooleanField(default=True)
    def __str__(self):
        return self.name

and this is the views.py code:

from django.shortcuts import render
from django.http import HttpResponse
from.models import Males,Females
def dat(request):
    if request.method=='POST':
        x=request.POST.get('malename')
        y=request.POST.get('maleage')
        z=request.POST.get('femalename')
        k=request.POST.get('femaleage')
        data=Males(name=x,age=y,girl.name=z,girl.age=k)
        
        data.save()
      
        


    return render(request,'pages/dating.html')

the problem is iin this line data=Males(name=x,age=y,girl.name=z,girl.age=k)
cant type girl.name=z why??
despite i create a vriable x=Males.objects.getall()
and i can by loop extract female name and age

You’re treating argument names as if they were objects you can assign to. When calling a function the left side of the equals sign needs to be the name of an argument.

I don’t know Django models, but I’m going to guess that this

needs to be this

data=Males(name=x, age=y, girl=Females(name=z, age=k))

thanks now the code appears to be right but this is what i get


now when running server