Increase length limits

This commit is contained in:
Gabriel Augendre 2018-05-24 00:16:59 +02:00
parent ee8f7807b4
commit cff3aef98c
2 changed files with 37 additions and 4 deletions

View file

@ -0,0 +1,33 @@
# Generated by Django 2.0.5 on 2018-05-23 22:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('manuels', '0012_auto_20180524_0014'),
]
operations = [
migrations.AlterField(
model_name='book',
name='field',
field=models.CharField(max_length=200, verbose_name='matière'),
),
migrations.AlterField(
model_name='editor',
name='name',
field=models.CharField(max_length=100, verbose_name='nom'),
),
migrations.AlterField(
model_name='level',
name='name',
field=models.CharField(max_length=50, verbose_name='nom'),
),
migrations.AlterField(
model_name='suppliesrequirement',
name='field',
field=models.CharField(max_length=200, verbose_name='matière'),
),
]

View file

@ -80,7 +80,7 @@ class Level(BaseModel):
class Meta: class Meta:
verbose_name = 'classe' verbose_name = 'classe'
verbose_name_plural = 'classes' verbose_name_plural = 'classes'
name = models.CharField('nom', max_length=10) name = models.CharField('nom', max_length=50)
def __str__(self): def __str__(self):
return self.name return self.name
@ -90,7 +90,7 @@ class Editor(BaseModel):
class Meta: class Meta:
verbose_name = 'éditeur' verbose_name = 'éditeur'
verbose_name_plural = 'éditeurs' verbose_name_plural = 'éditeurs'
name = models.CharField('nom', max_length=50) name = models.CharField('nom', max_length=100)
def __str__(self): def __str__(self):
return self.name return self.name
@ -109,7 +109,7 @@ class Book(BaseModel):
teacher = models.ForeignKey(verbose_name='enseignant', to=Teacher, on_delete=models.PROTECT, null=True) teacher = models.ForeignKey(verbose_name='enseignant', to=Teacher, on_delete=models.PROTECT, null=True)
level = models.ForeignKey(verbose_name='classe', to=Level, on_delete=models.PROTECT, null=True) level = models.ForeignKey(verbose_name='classe', to=Level, on_delete=models.PROTECT, null=True)
field = models.CharField('matière', max_length=100) field = models.CharField('matière', max_length=200)
title = models.TextField('titre') title = models.TextField('titre')
authors = models.TextField('auteurs') authors = models.TextField('auteurs')
editor = models.ForeignKey(verbose_name='éditeur', to=Editor, on_delete=models.PROTECT, null=True) editor = models.ForeignKey(verbose_name='éditeur', to=Editor, on_delete=models.PROTECT, null=True)
@ -151,7 +151,7 @@ class SuppliesRequirement(BaseModel):
teacher = models.ForeignKey(verbose_name='enseignant', to=Teacher, on_delete=models.PROTECT, null=True) teacher = models.ForeignKey(verbose_name='enseignant', to=Teacher, on_delete=models.PROTECT, null=True)
level = models.ForeignKey(verbose_name='classe', to=Level, on_delete=models.PROTECT, null=True) level = models.ForeignKey(verbose_name='classe', to=Level, on_delete=models.PROTECT, null=True)
field = models.CharField('matière', max_length=100) field = models.CharField('matière', max_length=200)
supplies = models.TextField('fournitures') supplies = models.TextField('fournitures')
def __str__(self): def __str__(self):