Supprime les doublons

This commit is contained in:
Med 2017-07-04 22:29:11 +02:00
parent eeb4d113b6
commit 9889e9ee50
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-04 18:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('media', '0007_auto_20170704_0138'),
]
operations = [
migrations.AlterField(
model_name='auteur',
name='nom',
field=models.CharField(max_length=255, unique=True),
),
migrations.AlterField(
model_name='jeu',
name='duree',
field=models.CharField(choices=[('-1h', '-1h'), ('1-2h', '1-2h'), ('2-3h', '2-3h'), ('3-4h', '3-4h'), ('4h+', '4h+')], max_length=255),
),
]

View File

@ -2,7 +2,7 @@ from django.db import models
from django.core.validators import MinValueValidator
class Auteur(models.Model):
nom = models.CharField(max_length=255)
nom = models.CharField(max_length=255, unique=True)
def __str__(self):
return self.nom
@ -30,6 +30,7 @@ class Jeu(models.Model):
('-1h', '-1h'),
('1-2h', '1-2h'),
('2-3h', '2-3h'),
('3-4h', '3-4h'),
('4h+', '4h+'),
)