def get_absolute_url(self):
        """
        The majority of the time, the URL is the parent's URL plus the slug.
        If not, override this function.
        """
        # Get the appropriate draft or published parent object for the current
        # item, otherwise we risk mixing the draft parent URL with a published
        # item's URL etc.
        if self.is_draft:
            visible_parent = self.parent.get_draft()
        else:
            # Fallback to draft URL for unpublished parent.
            visible_parent = self.parent.get_published() or \
                self.parent.get_draft()

        # Appending "/" to avoid a) django redirect and b) incorrect edit slug
        # for the admin.
        return urljoin(visible_parent.get_absolute_url(), self.slug + "/")
The majority of the time, the URL is the parent's URL plus the slug.
        If not, override this function.