blog2.0/blog/home/migrations/0003_homepage_body_homepagelink.py

53 lines
1.5 KiB
Python
Raw Permalink Normal View History

2024-06-14 14:57:03 +02:00
# Generated by Django 5.0.6 on 2024-06-14 12:48
import django.db.models.deletion
import modelcluster.fields
import wagtail.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("home", "0002_create_homepage"),
]
operations = [
migrations.AddField(
model_name="homepage",
name="body",
field=wagtail.fields.RichTextField(blank=True),
),
migrations.CreateModel(
name="HomePageLink",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"sort_order",
models.IntegerField(blank=True, editable=False, null=True),
),
("title", models.CharField(max_length=256)),
("link", models.URLField()),
(
"page",
modelcluster.fields.ParentalKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="links",
to="home.homepage",
),
),
],
options={
"ordering": ["sort_order"],
"abstract": False,
},
),
]