1. Steve Losh
  2. stoat

Commits

Steve Losh  committed 9d76893

Add parent.

  • Participants
  • Parent commits 32eda85
  • Branches default

Comments (0)

Files changed (2)

File docs/templating.rst

View file
 
 A normal Django ``get_absolute_url`` method that will return the page's URL.
 
+``page.parent``
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The page's parent.
+
 ``page.fields``
 ~~~~~~~~~~~~~~~
 

File stoat/models.py

View file
         return self.fields()
 
 
+    def parent(self):
+        return self.get_parent()
+
     def get_absolute_url(self):
         return self.url