diff --git a/home/models.py b/home/models.py index 8ee4d20..f5db16c 100644 --- a/home/models.py +++ b/home/models.py @@ -41,16 +41,18 @@ class CourseModulePage(Page): body = RichTextField(blank=True) @property - def full_title(self): + def course(self): if hasattr(self, "get_parent"): parent = self.get_parent() if parent and hasattr(parent, "specific"): - course = parent.specific - else: - course = None + return parent.specific + return None - if course and hasattr(course, "title"): - return f"{course.title} – {self.title}" + @property + def full_title(self): + course = self.course + if course: + return f"{course.title} - {self.title}" return self.title content_panels = Page.content_panels + ["body"]