35 lines
1.9 KiB
Python
35 lines
1.9 KiB
Python
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
initial = True
|
|
dependencies = []
|
|
operations = [
|
|
migrations.CreateModel(name='SiteContent', fields=[
|
|
('key', models.CharField(primary_key=True, max_length=100, serialize=False)),
|
|
('value', models.TextField(blank=True)),
|
|
('modified_at', models.DateTimeField(auto_now=True)),
|
|
], options={'ordering': ['key']}),
|
|
migrations.CreateModel(name='SitePage', fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('slug', models.SlugField(max_length=80, unique=True)),
|
|
('title', models.CharField(max_length=200)),
|
|
('description', models.CharField(blank=True, max_length=500)),
|
|
('nav_label', models.CharField(blank=True, max_length=100)),
|
|
('position', models.PositiveIntegerField(default=0)),
|
|
('published', models.BooleanField(default=True)),
|
|
('show_in_nav', models.BooleanField(default=True)),
|
|
], options={'ordering': ['position', 'pk']}),
|
|
migrations.CreateModel(name='SiteBlock', fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('page_slug', models.SlugField(db_index=True, max_length=80)),
|
|
('kind', models.CharField(choices=[('heading','Titre'),('text','Texte'),('image','Image'),('button','Bouton')], default='text', max_length=16)),
|
|
('title', models.CharField(blank=True, max_length=250)),
|
|
('body', models.TextField(blank=True)),
|
|
('image', models.CharField(blank=True, max_length=1200)),
|
|
('url', models.CharField(blank=True, max_length=1200)),
|
|
('position', models.PositiveIntegerField(default=0)),
|
|
('published', models.BooleanField(default=True)),
|
|
], options={'ordering': ['position', 'pk']}),
|
|
]
|