Skip to content

Commit e9603b8

Browse files
committed
swap order of Page and Mixin
1 parent 60d7a03 commit e9603b8

File tree

5 files changed

+5
-25
lines changed

5 files changed

+5
-25
lines changed

cdhweb/blog/models.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,6 @@ class BlogPost(BasePage, ClusterableModel):
174174
# custom manager/queryset logic
175175
objects = BlogPostManager()
176176

177-
# @property
178-
# def short_title(self):
179-
# """Shorter title with ellipsis."""
180-
# return Truncator(self.title).chars(65)
181-
182-
# @property
183-
# def short_description(self):
184-
# """Shorter description with ellipsis."""
185-
# return Truncator(self.get_description()).chars(250)
186-
187177
@cached_property
188178
def breadcrumbs(self):
189179
ancestors = self.get_ancestors().live().public().specific()
@@ -194,16 +184,6 @@ def author_list(self):
194184
"""Comma-separated list of author names."""
195185
return ", ".join(str(author.person) for author in self.authors.all())
196186

197-
# def __str__(self):
198-
# # string is used for logging actions on drafts,
199-
# # needs to handle cases where first published date is not set
200-
# if self.first_published_at:
201-
# pubdate = format(self.first_published_at, "F j, Y")
202-
# else:
203-
# pubdate = "draft"
204-
205-
# return '"%s" (%s)' % (self.short_title, pubdate)
206-
207187
def get_url_parts(self, *args, **kwargs):
208188
"""Custom blog post URLs of the form /updates/2014/03/01/my-post."""
209189
url_parts = super().get_url_parts(*args, **kwargs)
@@ -245,7 +225,7 @@ class BlogLinkPageArchived(LinkPage):
245225
subpage_types = [BlogPost]
246226

247227

248-
class BlogLandingPage(Page, StandardHeroMixinNoImage):
228+
class BlogLandingPage(StandardHeroMixinNoImage, Page):
249229
"""Container page that defines where Event pages can be created."""
250230

251231
content_panels = StandardHeroMixinNoImage.content_panels

cdhweb/blog/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
from django.utils import timezone
66

7-
from cdhweb.blog.models import Author, BlogLinkPageArchivedArchived, BlogPost
7+
from cdhweb.blog.models import Author, BlogLinkPageArchived, BlogPost
88
from cdhweb.pages.tests.conftest import to_streamfield_safe
99

1010
EST = zoneinfo.ZoneInfo("America/New_York")

cdhweb/events/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ class EventsLinkPageArchived(LinkPage):
403403
subpage_types = [Event, LinkPage, ContentPage]
404404

405405

406-
class EventsLandingPage(Page, StandardHeroMixinNoImage):
406+
class EventsLandingPage(StandardHeroMixinNoImage, Page):
407407
"""Container page that defines where Event pages can be created."""
408408

409409
content_panels = StandardHeroMixinNoImage.content_panels

cdhweb/pages/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class Meta:
364364
verbose_name = "Section Landing Page"
365365

366366

367-
class HomePage(Page, HomePageHeroMixin):
367+
class HomePage(HomePageHeroMixin, Page):
368368
"""A home page that aggregates and displays featured content."""
369369

370370
body = StreamField(

cdhweb/projects/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ class ProjectsLandingPageArchived(LandingPage):
344344
template = LandingPage.template
345345

346346

347-
class ProjectsLandingPage(Page, StandardHeroMixin):
347+
class ProjectsLandingPage(StandardHeroMixin, Page):
348348
content_panels = StandardHeroMixin.content_panels
349349

350350
search_fields = StandardHeroMixin.search_fields

0 commit comments

Comments
 (0)