57 lines
1.8 KiB
Python
57 lines
1.8 KiB
Python
# Generated by Django 5.0.6 on 2024-06-12 16:15
|
|
|
|
import django.db.models.deletion
|
|
import wagtail.fields
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
initial = True
|
|
|
|
dependencies = [
|
|
("wagtailcore", "0093_uploadedfile"),
|
|
("wagtailimages", "0026_delete_uploadedimage"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="BlogPage",
|
|
fields=[
|
|
(
|
|
"page_ptr",
|
|
models.OneToOneField(
|
|
auto_created=True,
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
parent_link=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
to="wagtailcore.page",
|
|
),
|
|
),
|
|
(
|
|
"introduction",
|
|
models.TextField(blank=True, help_text="Introduction de l'article"),
|
|
),
|
|
("body", wagtail.fields.RichTextField(blank=True)),
|
|
(
|
|
"date_published",
|
|
models.DateField(verbose_name="Date de publication de l'article"),
|
|
),
|
|
(
|
|
"image",
|
|
models.ForeignKey(
|
|
blank=True,
|
|
help_text="Image de l'article",
|
|
null=True,
|
|
on_delete=django.db.models.deletion.SET_NULL,
|
|
related_name="+",
|
|
to="wagtailimages.image",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"abstract": False,
|
|
},
|
|
bases=("wagtailcore.page",),
|
|
),
|
|
]
|