mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-11-26 20:47:10 +00:00
Auteur en many to many
This commit is contained in:
parent
9501a10eac
commit
419154caac
24
media/migrations/0005_auto_20170630_1551.py
Normal file
24
media/migrations/0005_auto_20170630_1551.py
Normal file
@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-06-30 13:51
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('media', '0004_auto_20170629_1539'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='media',
|
||||
name='auteur',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='media',
|
||||
name='auteur',
|
||||
field=models.ManyToManyField(to='media.Auteur'),
|
||||
),
|
||||
]
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user