Skip to content

Commit 84ba187

Browse files
committed
blog page and blog landing page
1 parent 1ae2d98 commit 84ba187

16 files changed

+405
-135
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Django 5.0.5 on 2024-06-11 21:08
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("blog", "0012_alter_blogpost_body"),
9+
]
10+
11+
operations = [
12+
migrations.RenameField(
13+
model_name="blogpost",
14+
old_name="featured_image",
15+
new_name="image",
16+
),
17+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Generated by Django 5.0.5 on 2024-06-11 21:17
2+
3+
import wagtail.fields
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
dependencies = [
9+
("blog", "0013_rename_featured_image_blogpost_image"),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name="blogpost",
15+
name="alt_text",
16+
field=models.CharField(
17+
blank=True,
18+
help_text="Describe the image for screen readers",
19+
max_length=80,
20+
),
21+
),
22+
migrations.AddField(
23+
model_name="blogpost",
24+
name="caption",
25+
field=wagtail.fields.RichTextField(
26+
blank=True, help_text="A short caption for the image.", max_length=180
27+
),
28+
),
29+
migrations.AddField(
30+
model_name="blogpost",
31+
name="credit",
32+
field=wagtail.fields.RichTextField(
33+
blank=True,
34+
help_text="A credit line or attribution for the image.",
35+
max_length=80,
36+
),
37+
),
38+
]
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Generated by Django 5.0.5 on 2024-06-11 21:21
2+
3+
import wagtail.fields
4+
from django.db import migrations
5+
6+
7+
class Migration(migrations.Migration):
8+
dependencies = [
9+
("blog", "0014_blogpost_alt_text_blogpost_caption_blogpost_credit"),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name="blogpost",
15+
name="description",
16+
field=wagtail.fields.RichTextField(
17+
blank=True,
18+
help_text="Short introduction to the page, aim for max two clear sentences (max. 200 chars).",
19+
max_length=200,
20+
null=True,
21+
verbose_name="Blog description",
22+
),
23+
),
24+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Generated by Django 5.0.5 on 2024-06-11 21:50
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("blog", "0015_alter_blogpost_description"),
9+
]
10+
11+
operations = [
12+
migrations.AddField(
13+
model_name="blogpost",
14+
name="short_description",
15+
field=models.TextField(
16+
blank=True,
17+
help_text="A short description of the content for promotional or navigation purposes. Displayed on tiles, not on page itself.",
18+
max_length=130,
19+
verbose_name="Short description",
20+
),
21+
),
22+
migrations.AddField(
23+
model_name="blogpost",
24+
name="short_title",
25+
field=models.CharField(
26+
blank=True,
27+
default="",
28+
help_text="Displayed on tiles, breadcrumbs etc., not on page itself. ",
29+
max_length=80,
30+
verbose_name="Short title",
31+
),
32+
),
33+
]

Diff for: cdhweb/blog/migrations/0017_blogpost_article_date.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Generated by Django 5.0.5 on 2024-06-11 21:58
2+
3+
import django.utils.timezone
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
dependencies = [
9+
("blog", "0016_blogpost_short_description_blogpost_short_title"),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name="blogpost",
15+
name="article_date",
16+
field=models.DateTimeField(
17+
default=django.utils.timezone.localdate,
18+
help_text="Published date for blog post",
19+
verbose_name="Published date",
20+
),
21+
),
22+
]
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Generated by Django 5.0.5 on 2024-06-11 22:55
2+
3+
import django.db.models.deletion
4+
import wagtail.fields
5+
from django.db import migrations, models
6+
7+
8+
class Migration(migrations.Migration):
9+
dependencies = [
10+
("blog", "0017_blogpost_article_date"),
11+
("cdhpages", "0047_alter_contentpage_body_alter_homepage_body_and_more"),
12+
("wagtailcore", "0089_log_entry_data_json_null_to_object"),
13+
]
14+
15+
operations = [
16+
migrations.CreateModel(
17+
name="BlogLandingPage",
18+
fields=[
19+
(
20+
"page_ptr",
21+
models.OneToOneField(
22+
auto_created=True,
23+
on_delete=django.db.models.deletion.CASCADE,
24+
parent_link=True,
25+
primary_key=True,
26+
serialize=False,
27+
to="wagtailcore.page",
28+
),
29+
),
30+
(
31+
"description",
32+
wagtail.fields.RichTextField(
33+
blank=True,
34+
help_text="Short introduction to the page, aim for max two clear sentences (max. 200 chars). \n Used to orient the user and help them identify relevancy of the page to meet their needs. ",
35+
max_length=200,
36+
null=True,
37+
verbose_name="Page Summary",
38+
),
39+
),
40+
],
41+
options={
42+
"abstract": False,
43+
},
44+
bases=("wagtailcore.page", models.Model),
45+
),
46+
migrations.RenameModel(
47+
old_name="BlogLinkPage",
48+
new_name="BlogLinkPageArchived",
49+
),
50+
]

0 commit comments

Comments
 (0)