site_tps/content/migrations/0001_initial.py
2018-02-28 21:25:44 +01:00

33 lines
1.3 KiB
Python

# Generated by Django 2.0.1 on 2018-02-28 18:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('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')),
],
),
migrations.CreateModel(
name='Content',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='Nom du contenu')),
('file', models.FileField(upload_to='', verbose_name='Fichier')),
('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='content.Category', verbose_name='Catégorie')),
],
),
]