2018-03-08 22:16:03 +00:00
|
|
|
# Generated by Django 2.0.1 on 2018-03-08 22:03
|
2018-01-14 18:05:53 +00:00
|
|
|
|
2018-03-08 22:16:03 +00:00
|
|
|
import content.models
|
2018-01-14 18:05:53 +00:00
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
2018-03-08 22:16:03 +00:00
|
|
|
('users', '0001_initial'),
|
2018-01-14 18:05:53 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Category',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2018-02-28 14:06:55 +00:00
|
|
|
('name', models.CharField(max_length=255, verbose_name='Nom de la catégorie')),
|
|
|
|
('description', models.TextField(default='', verbose_name='Descriton de la catégorie')),
|
|
|
|
('image', models.ImageField(null=True, upload_to='', verbose_name='Illustration de la catégorie')),
|
2018-01-14 18:05:53 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Content',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2018-01-24 10:33:05 +00:00
|
|
|
('name', models.CharField(max_length=255, verbose_name='Nom du contenu')),
|
2018-03-08 22:16:03 +00:00
|
|
|
('file', models.FileField(upload_to=content.models.get_upload_to, validators=[content.models.validate_file_extension], verbose_name='Fichier')),
|
2018-01-24 10:33:05 +00:00
|
|
|
('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='content.Category', verbose_name='Catégorie')),
|
2018-03-08 22:16:03 +00:00
|
|
|
('school_owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.School')),
|
2018-01-14 18:05:53 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
]
|