python – how I enroll a student in a course and show this course on their profile?

I have this model of the course:

class Minicursos(models.Model):
nome_minicurso = models.CharField(max_length=150)

resumo = models.TextField(max_length=500, default = "")
descricao = models.TextField(max_length=500, default = "")

imagem_minicurso = models.ImageField(upload_to="gallery", height_field=None, width_field=None, max_length=None, default = "")
video_explicativo = models.FileField(upload_to="video/%y", default="",)

carga_horaria = models.IntegerField()

nome_instrutor = models.CharField(max_length=150, default = "")
data_inicio = models.DateField(verbose_name=("Data Inicio"), null=True)
data_termino = models.DateField(verbose_name=("Data Termino"), null=True)

aula_0 = models.FileField(upload_to=f"video/aulas/%y", default="", null=True, blank=True),
aula_1 = models.FileField(upload_to=f"video/aulas/%y", default="", null=True, blank=True),
atividade_1 = models.TextField(max_length=500, default = "",null=True, blank=True)

aula_2= models.FileField(upload_to=f"video/aulas/%y", default="",null=True, blank=True)
atividade_2 = models.TextField(max_length=500, default = "",null=True, blank=True)

aula_3 = models.FileField(upload_to=f"video/aulas/%y", default="",null=True, blank=True)
atividade_3 = models.TextField(max_length=500, default = "",null=True, blank=True)

aula_4 = models.FileField(upload_to=f"video/aulas/%y", default="",null=True, blank=True)
atividade_4 = models.TextField(max_length=500, default = "",null=True, blank=True)

aula_5 = models.FileField(upload_to=f"video/aulas/%y", default="",null=True, blank=True)
atividade_5 = models.TextField(max_length=500, default = "",null=True, blank=True)

aula_6 = models.FileField(upload_to=f"video/aulas/%y", default="",null=True, blank=True)
atividade_6 = models.TextField(max_length=500, default = "",null=True, blank=True)

aula_7 = models.FileField(upload_to=f"video/aulas/%y", default="",null=True, blank=True)
atividade_7 = models.TextField(max_length=500, default = "",null=True, blank=True)

aula_8 = models.FileField(upload_to=f"video/aulas/%y", default="",null=True, blank=True)
atividade_8 = models.TextField(max_length=500, default = "",null=True, blank=True)

def __str__(self):
    return self.nome_minicurso

Obs: the bug indentation

And i have this model of the User Profile

class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
bio = models.TextField(max_length=500, blank=True)
profile_image = models.ImageField(default='profile.png', upload_to='users/', null=True, blank=True)

def __str__(self):
    return '%s %s' % (self.user.first_name, self.user.last_name)

@receiver(post_save, sender=User)
def create_user_profile(sender, instance, created, **kwargs):
if created:
Profile.objects.create(user=instance)

@receiver(post_save, sender=User)
def save_user_profile(sender, instance, **kwargs):
instance.profile.save()

I want to be able to enroll a student in a course and be able to pull objects from the mini course, such as name, description and display in the user’s profile. Can someone help me?