]> git.ipfire.org Git - ipfire.org.git/commitdiff
wiki: Correctly implement comparing and sorting pages
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Jun 2023 08:50:09 +0000 (08:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Jun 2023 08:50:09 +0000 (08:50 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/wiki.py
src/templates/docs/base.html [moved from src/templates/wiki/base.html with 100% similarity]
src/templates/docs/modules/header.html [moved from src/templates/wiki/modules/navbar.html with 100% similarity]
src/templates/docs/page.html [moved from src/templates/wiki/page.html with 100% similarity]

index c8a8ff8d44a8fffa045ed71bfcb62f8032f95fc0..722bf13df924b7aed1ce5226b14487e77073fb01 100644 (file)
@@ -266,6 +266,8 @@ class Page(misc.Object):
                if isinstance(other, self.__class__):
                        return self.id == other.id
 
+               return NotImplemented
+
        def __lt__(self, other):
                if isinstance(other, self.__class__):
                        if self.page == other.page:
@@ -273,6 +275,8 @@ class Page(misc.Object):
 
                        return self.page < other.page
 
+               return NotImplemented
+
        @staticmethod
        def sanitise_page_name(page):
                if not page: