1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-05 18:03:57 +02:00

Auteur en many to many

This commit is contained in:
Med
2017-06-30 16:01:44 +02:00
parent 9501a10eac
commit 419154caac
2 changed files with 25 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class Auteur(models.Model):
class Media(models.Model):
titre = models.CharField(max_length=255)
cote = models.CharField(max_length=31)
auteur = models.ForeignKey('Auteur', on_delete=models.PROTECT)
auteur = models.ManyToManyField('Auteur')
# type = TODO
def __str__(self):