Skip to content

Commit

Permalink
Merge pull request #323 from danesjenovdan/v3-dev
Browse files Browse the repository at this point in the history
Pulling refs/heads/v3-dev into v3-k8s
  • Loading branch information
patricijab authored Sep 2, 2024
2 parents cc81eb0 + 6a0d242 commit 4804a1a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
19 changes: 19 additions & 0 deletions djnd/home/migrations/0078_newsletterpage_short_description.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.15 on 2024-09-02 11:25

from django.db import migrations
import wagtail.fields


class Migration(migrations.Migration):

dependencies = [
('home', '0077_bloglistingpage_meta_image_blogpage_meta_image_and_more'),
]

operations = [
migrations.AddField(
model_name='newsletterpage',
name='short_description',
field=wagtail.fields.RichTextField(blank=True, null=True),
),
]
2 changes: 2 additions & 0 deletions djnd/home/models/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ class NewsletterPage(BasePage):
on_delete=models.SET_NULL,
related_name="+",
)
short_description = RichTextField(blank=True, null=True)
introduction = RichTextField(blank=True, null=True)
published_at = models.DateField(blank=True, null=True)
pillar_page = ParentalManyToManyField(
Expand Down Expand Up @@ -317,6 +318,7 @@ class NewsletterPage(BasePage):

content_panels = BasePage.content_panels + [
FieldPanel("thumbnail"),
FieldPanel("short_description"),
FieldPanel("published_at"),
FieldPanel("pillar_page", widget=forms.CheckboxSelectMultiple),
FieldPanel("category", widget=forms.CheckboxSelectMultiple),
Expand Down
1 change: 1 addition & 0 deletions djnd/home/templates/home/partials/newsletter_activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"
>{{ activity.title }}</a>
</div>
{{ activity.short_description|richtext }}
{% if activity.published_at %}
<p class="font-mono mt-4">{{ activity.published_at|date:"E Y" }}</p>
{% endif %}
Expand Down

0 comments on commit 4804a1a

Please sign in to comment.