Bläddra i källkod

Simplify BlogPage model, remove unneeded properties and methods

David Ray 8 år sedan
förälder
incheckning
6d7db27b59
1 ändrade filer med 1 tillägg och 8 borttagningar
  1. 1 8
      bakerydemo/blog/models.py

+ 1 - 8
bakerydemo/blog/models.py

@@ -25,7 +25,7 @@ from bakerydemo.base.blocks import BaseStreamBlock
 
 class BlogPeopleRelationship(Orderable, models.Model):
     '''
-    This defines the relationship between the `Peopole` within the `base`
+    This defines the relationship between the `People` within the `base`
     app and the BlogPage below allowing us to add people to a BlogPage.
     '''
     page = ParentalKey(
@@ -99,13 +99,6 @@ class BlogPage(Page):
             ])
         return tags
 
-    @property
-    def blog_index(self):
-        return self.get_ancestors().type(BlogIndexPage).last()
-
-    def get_absolute_url(self):
-        return self.full_url
-
     parent_page_types = ['BlogIndexPage']
 
     # Defining what content type can sit under the parent