Rename "enseignant" to "coordonnateur". Close #9

This commit is contained in:
Gabriel Augendre 2018-06-02 16:31:29 +02:00
parent 17d9798394
commit 5876525b8e
3 changed files with 33 additions and 5 deletions

View file

@ -53,7 +53,7 @@ class BookAdmin(ExportMixin, admin.ModelAdmin):
('Élève', { ('Élève', {
'fields': ('price', 'previously_acquired',) 'fields': ('price', 'previously_acquired',)
}), }),
('Enseignant', { ('Coordonnateur', {
'fields': ('teacher', 'level', 'field') 'fields': ('teacher', 'level', 'field')
}), }),
('Gestion', { ('Gestion', {

View file

@ -0,0 +1,28 @@
# Generated by Django 2.0.5 on 2018-06-02 14:30
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('manuels', '0019_auto_20180531_0815'),
]
operations = [
migrations.AlterModelOptions(
name='teacher',
options={'verbose_name': 'coordonnateur', 'verbose_name_plural': 'coordonnateurs'},
),
migrations.AlterField(
model_name='book',
name='teacher',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='manuels.Teacher', verbose_name='coordonnateur'),
),
migrations.AlterField(
model_name='suppliesrequirement',
name='teacher',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='manuels.Teacher', verbose_name='coordonnateur'),
),
]

View file

@ -29,8 +29,8 @@ def phone_validator(value):
class Teacher(BaseModel): class Teacher(BaseModel):
class Meta: class Meta:
verbose_name = 'enseignant' verbose_name = 'coordonnateur'
verbose_name_plural = 'enseignants' verbose_name_plural = 'coordonnateurs'
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
first_name = models.CharField('prénom', max_length=100) first_name = models.CharField('prénom', max_length=100)
last_name = models.CharField('nom', max_length=100) last_name = models.CharField('nom', max_length=100)
@ -107,7 +107,7 @@ class Book(BaseModel):
verbose_name = 'livre' verbose_name = 'livre'
verbose_name_plural = 'livres' verbose_name_plural = 'livres'
teacher = models.ForeignKey(verbose_name='enseignant', to=Teacher, on_delete=models.PROTECT, null=True) teacher = models.ForeignKey(verbose_name='coordonnateur', 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('discipline', max_length=200) field = models.CharField('discipline', max_length=200)
title = models.TextField('titre') title = models.TextField('titre')
@ -164,7 +164,7 @@ class SuppliesRequirement(BaseModel):
verbose_name = 'demande de fournitures' verbose_name = 'demande de fournitures'
verbose_name_plural = 'demandes de fournitures' verbose_name_plural = 'demandes de fournitures'
teacher = models.ForeignKey(verbose_name='enseignant', to=Teacher, on_delete=models.PROTECT, null=True) teacher = models.ForeignKey(verbose_name='coordonnateur', 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)
fields = models.TextField('disciplines') fields = models.TextField('disciplines')
supplies = models.TextField('fournitures') supplies = models.TextField('fournitures')