The ManyToManyField fields of my model are not created in the database

The ManyToManyField fields of my model are not created in the database
I have created a project model.
For each project I would like to display all human and material resources assigned to the project.
Except that after creating a project through the form, I found that some fields of my model were not created in the database, as shown in the image below:

here join my model

class Projet(models.Model):
    STATUS = (
        (1, 'NON DÉBUTÉ'),
        (2, 'EN COURS'),
        (3, 'TERMINER'),
        (4, 'ARCHIVER'),
    )

    name = models.CharField(max_length=100, default=None)
    description = models.TextField(default=None)
    start_date = models.DateField(default=timezone.now)
    end_date = models.DateField(default=timezone.now)
    chef_project = models.ForeignKey(
                    User,
                    on_delete=models.CASCADE,
                    related_name='chef_project',
                    default=None
                    )
    conducteur_travaux = models.ForeignKey(
                            User,
                            on_delete=models.CASCADE,
                            related_name='conducteur_travaux',
                            default=None
                            )
    list_intervenant = models.ManyToManyField(
                            User,
                            related_name='intervenant'
                            )
    list_materiels = models.ManyToManyField(Materiels)
    client = models.ForeignKey(
                Client,
                on_delete=models.CASCADE,
                default=None
                )
    status = models.PositiveSmallIntegerField(
                choices=STATUS,
                default=1
                )
    budget = models.IntegerField(default=0)
    pieces_jointes = models.FileField(
                        verbose_name='image',
                        upload_to='media/upload/documents',
                        null=True
                        )

    def save(self, *args, **kwargs):
        super().save(*args, **kwargs)
        event = Event(
                    title=self.name,
                    description=self.description,
                    start_time=self.start_date,
                    end_time=self.end_date
                    )
        event.save()

    """ def delete(self, *args, **kwargs):
        super().save(*args, **kwargs)
        Event.objects.filter(
                title=self.name,
                description=self.description
                ).delete() """

here join the image created in the database


as you can see, the fields: list_intervenant, list_materiels are not created in the database.
What do you think my mistake is?
Thank you in advance

Have you tried using Project.objects.first().list_intervenant to access the many to many fields? A values call will change the object into a dictionary. Django won’t automatically convert a many to many relation into some primitive collection unless you tell it to specifically.

Thank you, it helps a lot, but how to display objects?

take a look into the prefetch_related method from the queryset. Docs

What do you mean by display objects?

ok thanks, I will look at the documentation and get back to you with the results

the fields list_intervenant contains the list of participants on a project that I would like to display in a template. except that the returned objects are not iterable. So I’m looking for a way to display this list of collection

In addition to the docs referenced above, you should also read Many-to-many relationships | Django documentation | Django.

That page has a lot of examples of using Many-to-many relationships.

ok thanks for the orientation. i will keep you informed of the progress

Thanks to all @ CodenameTim @leandrodesouzadev @KenWhitesell , this Project.objects.get(pk=pk).list_intervenant.all() instruction solved my problem