74 lines
3 KiB
Python
74 lines
3 KiB
Python
# Generated by Django 2.0.5 on 2018-05-21 19:54
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import manuels.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('manuels', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Book',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('field', models.CharField(max_length=100, verbose_name='matière')),
|
|
('title', models.TextField(verbose_name='titre')),
|
|
('authors', models.TextField(verbose_name='auteurs')),
|
|
('editor', models.CharField(max_length=200, verbose_name='éditeur')),
|
|
('collection', models.CharField(blank=True, max_length=200, verbose_name='collection')),
|
|
('publication_year', models.PositiveIntegerField(verbose_name='année de publication')),
|
|
('isbn', models.TextField(validators=[manuels.models.isbn_validator], verbose_name='ISBN/EAN')),
|
|
('price', models.PositiveIntegerField(verbose_name='prix')),
|
|
('previously_acquired', models.BooleanField(verbose_name="manuel acquis précédemment par l'élève")),
|
|
],
|
|
options={
|
|
'verbose_name': 'livre',
|
|
'verbose_name_plural': 'livres',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Level',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=10, verbose_name='nom')),
|
|
],
|
|
options={
|
|
'verbose_name': 'classe',
|
|
'verbose_name_plural': 'classe',
|
|
},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='teacher',
|
|
options={'verbose_name': 'enseignant', 'verbose_name_plural': 'enseignants'},
|
|
),
|
|
migrations.AlterField(
|
|
model_name='teacher',
|
|
name='first_name',
|
|
field=models.CharField(max_length=100, verbose_name='prénom'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='teacher',
|
|
name='last_name',
|
|
field=models.CharField(max_length=100, verbose_name='nom'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='teacher',
|
|
name='phone_number',
|
|
field=models.CharField(max_length=10, verbose_name='numéro de téléphone'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='book',
|
|
name='level',
|
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='manuels.Level'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='book',
|
|
name='teacher',
|
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='manuels.Teacher'),
|
|
),
|
|
]
|