From: Michael Tremer Date: Tue, 27 Jun 2023 08:50:09 +0000 (+0000) Subject: wiki: Correctly implement comparing and sorting pages X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0713d9ae35b3dbc3706298c45682c1e20a731e52;p=ipfire.org.git wiki: Correctly implement comparing and sorting pages Signed-off-by: Michael Tremer --- diff --git a/src/backend/wiki.py b/src/backend/wiki.py index c8a8ff8d..722bf13d 100644 --- a/src/backend/wiki.py +++ b/src/backend/wiki.py @@ -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: diff --git a/src/templates/wiki/base.html b/src/templates/docs/base.html similarity index 100% rename from src/templates/wiki/base.html rename to src/templates/docs/base.html diff --git a/src/templates/wiki/modules/navbar.html b/src/templates/docs/modules/header.html similarity index 100% rename from src/templates/wiki/modules/navbar.html rename to src/templates/docs/modules/header.html diff --git a/src/templates/wiki/page.html b/src/templates/docs/page.html similarity index 100% rename from src/templates/wiki/page.html rename to src/templates/docs/page.html